annoying Java compiling issue.

Discussion in 'Mac Programming' started by Hylekmi, Jan 23, 2012.

  1. Hylekmi, Jan 23, 2012
    Last edited by a moderator: Jan 24, 2012

    macrumors regular

    Dec 8, 2010
    import java.util.Scanner;
    public class PizzaStore
    	public static void main(String[]args)
    			Scanner console = new Scanner (;
    			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: 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?
  2. macrumors 65816


    Dec 16, 2010
  3. macrumors member


    Jan 10, 2012
    Trust me, use an IDE. I used to code Java manually, but I started using Eclipse at the urging of my Java instructor last quarter and it's been a godsend. Chances are it would have given you a suggestion to basically follow jiminaus's advice.
  4. Hylekmi, Jan 24, 2012
    Last edited: Jan 24, 2012

    thread starter macrumors regular

    Dec 8, 2010
    I am going to try to get an IDE when i have more time. I am currently swamped with homework and i have to stick with TextWrangler for the time being.
  5. macrumors G5


    Aug 1, 2004
    St. Louis, MO
    It takes a few minutes to download Eclipse and even less time to set it up. In the amount of time it took you to make this thread and wait for an answer, you would've solved your problem if you had a proper IDE.

Share This Page