Originally Posted by
higv2000
Couple of comments and solution:
1. If your intention is to continue the loop when the user enters "y" or "Y" for C, then you can replace the while loop as }while(c == 'y' || c == 'Y');
Since the variable c is a String that won't work.
2. Secondly, if you are doing String comparison, you should use .equals() method. What you are comparing is like memory addresses or simulation of pointers.
Already covered and solved.
3. I don't see any declaration for the variable "flag" although you don't need this anymore if you modify the while construct as explained above in #1.
Declared on the first line of the main method.
The problems continue.
6. Where do you store the values entered?