Code:
import java.util.Scanner;
public class PizzaStore
{
public static void main(String[]args)
{
Scanner console = new Scanner (System.in);
String day;
System.out.println ("What day of the week is it?");
day= console.nextString ();
}
}//end public class
When i go to compile this i get the error(
Code:
PizzaStore.java:14: cannot find symbol
symbol : method nextString()
location: class java.util.Scanner
day= console.nextString ();
)
I have the same code in another program i use (except for the fact that its type Int instead) and it works fine. It could be because of the String. I just don't know and its just plain annoying. Can anyone explain why this is?
Last edited by a moderator: