:) glad to see you figured it out.
Yes, you can't use the == comparison for strings because strings are objects. The == on objects compares the addresses of the strings. Just because the value of...
Type: Posts; User: helloworld922
:) glad to see you figured it out.
Yes, you can't use the == comparison for strings because strings are objects. The == on objects compares the addresses of the strings. Just because the value of...
You want the program to terminate when the user types "quit", not something that starts with 'q'. Use the equals method:
String input ="";
while(!"quit".equals(input))
{
//... stuff...