The reason you don't get output is because you don't have else clauses to counter total mismatches.
The reason it seeks an else clause is because program logic is wrong.
When you compare chars...
Type: Posts; User: newbie
The reason you don't get output is because you don't have else clauses to counter total mismatches.
The reason it seeks an else clause is because program logic is wrong.
When you compare chars...
You would get errors as I only gave up the code for your main method.
For it to work, you obviously need to keep your original class declaration and imports.
The reason I nested them properly was...
Your problem is simply based on misinterpretations of how your if blocks are nested.
To avoid this in the future, always use braces to open and close each block.
Here I have simply added in all...