so for some reason it doesn't run even though i typed it as the book said to do
import javax.swing.*; public class JProject3 { public static void main(String[] args) { int k,m,x; String Bean; /* for (k=0; k<20; k++) { System.out.println("The values are\t" + ((k*2)-11)); } System.out.println(); System.out.println(); for (k=0; k<20; k++) { System.out.println("The values are\t\t" + ((k+1)*101)); } System.out.println(); System.out.println(); m = 1; for (k=0; k<20; k++) { if (m==1) { System.out.println("The Values are\t\t\t" + (Math.pow(10,(k+2)))); } else { System.out.println("The Values are\t\t\t" + (Math.pow(10,k))); k=k-1; } m=m*(-1); } System.out.println(); System.out.println(); for (k=0; k<20; k++) { System.out.println("The Values are \t\t\t\t" + ((k+1)*(k+1)*(k+1))); } System.out.println(); x = 10; for (k=0; k<20; k++) { System.out.println("This works " + Math.round((1/Math.sqrt(5))*((Math.pow(((1+Math.sqrt(5))/2),k))-(Math.pow(((1-Math.sqrt(5))/2),k))))); } */ Bean = JOptionPane.showInputDialog("Give me an input"); if ( (searchStr(Bean,f)) == f) { System.out.println("AWESOME"); } else { System.out.println("Not Awesome"); } } }
its at the very end of the code where im trying to search an input for f that im running into a problem with.