You still need to format the code. The { and }s should not all be in the first column.
Check the locations of the {}s you have too many/
No } should be on a line with anything else. Put all }s on their own line.
There are two programs. Which are you executing?
You need some more printlns inside all the while loops that print out the values of the variables used:
i and j are what control the loops. You need to see them before the while statements and inside the loops. If nothing prints then you need to add more in different places outside and inside the loops.
I'm done for tonight. Back tomorrow.