For testing I suggest that you comment out the scanner and the loop and define a String to scan in the program.
When the code can scan and report on that String, then you can restore the loop etc....
Type: Posts; User: Norm
For testing I suggest that you comment out the scanner and the loop and define a String to scan in the program.
When the code can scan and report on that String, then you can restore the loop etc....
Why does the program want to scan lines of text? What is the purpose of doing that?
The posted code is not formatted properly. Nested statements within {}s should be indented 3-4 spaces. All...
Please edit your post and wrap your code with
<YOUR CODE HERE>
to get highlighting and preserve formatting.
What is the purpose of the Scanner object and the while loop?
Someone somewhere thinks that the main() method testing MUST be in a special class, not in the class that is being tested.
Personally I think the testing code (the main() method) should be in the...
I suggested this on the other thread. Learn the techniques by writing a small simple program.
Then add to it to learn how to use methods.
I suggest that you put this code aside for a while and...
Please start your own thread for your problem.
Where is the class with the main() method. That is where the program's execution starts.
Please edit your post and wrap your code with
...