xtremezx2
Daemon Poster
- Messages
- 915
try a bit of troubleshooting.
After the:
If it now errors on this line, chances are your variable is null and has not been set the way you think it is.
Update:
Looks like you may want to have something like:
http://mrbernal.freeshell.org/java/...troductory/console/console-input-scanner.html
After the:
Code:
System.out.println("Enter a name: ");
phrase = kybd.nextString();
System.out.println("'" + phrase + "'"); //This will print out what is contained
//in your variable.
If it now errors on this line, chances are your variable is null and has not been set the way you think it is.
Update:
Looks like you may want to have something like:
Code:
kybd.nextLine(); // Read one line from the console.