Ok, I am trying to write a program for one of my classes. I tried mine and it didn't work and then I tried what was in the book and copied straight out the book and it still didn't work.
public static void main(String[] args) {
System.out.println("Hello out there.");
System.out.println("Want to talk some more?");
System.out.println("Answer y for yes or n for no.");
char answerLetter;
answerLetter = SavitchIn.readLineNonwhiteChar();
if (answerLetter == 'y')
System.out.println("Nice weather we are having.");
System.out.println("Good-bye.");
System.out.println("Press enter key to end program.");
String junk;
junk = SavitchIn.readLine();
}
} // firstprogram
That is the program and here is the problem it gives me when I go to compile it.
CompileServer output:
c:/emacs-21.2/bin/firstprogram.java
c:/emacs-21.2/bin/firstprogram.java:22: cannot resolve symbol
symbol : variable SavitchIn
location: class firstprogram
answerLetter = SavitchIn.readLineNonwhiteChar();
^
c:/emacs-21.2/bin/firstprogram.java:29: cannot resolve symbol
symbol : variable SavitchIn
location: class firstprogram
junk = SavitchIn.readLine();
^
2 errors
Compilation exited abnormally with code 1 at Mon Jan 20 22:54:14
Thanks
public static void main(String[] args) {
System.out.println("Hello out there.");
System.out.println("Want to talk some more?");
System.out.println("Answer y for yes or n for no.");
char answerLetter;
answerLetter = SavitchIn.readLineNonwhiteChar();
if (answerLetter == 'y')
System.out.println("Nice weather we are having.");
System.out.println("Good-bye.");
System.out.println("Press enter key to end program.");
String junk;
junk = SavitchIn.readLine();
}
} // firstprogram
That is the program and here is the problem it gives me when I go to compile it.
CompileServer output:
c:/emacs-21.2/bin/firstprogram.java
c:/emacs-21.2/bin/firstprogram.java:22: cannot resolve symbol
symbol : variable SavitchIn
location: class firstprogram
answerLetter = SavitchIn.readLineNonwhiteChar();
^
c:/emacs-21.2/bin/firstprogram.java:29: cannot resolve symbol
symbol : variable SavitchIn
location: class firstprogram
junk = SavitchIn.readLine();
^
2 errors
Compilation exited abnormally with code 1 at Mon Jan 20 22:54:14
Thanks