I am using eclipse and i get this error:
Exception in thread \"main\" java.lang.Error: Unresolved compilation problem: at Wall.main(Wall.java:6)
From the code you posted, line 6 contains no syntax error. I can only guess it's eclipse build problem, maybe you turned off auto compilation on file saving, or eclipse is looking at old version of the class files generated from your code (or maybe you haven't even saved your file)
Id suggest you save all files, and try a rebuild by doing Project -> Clean (if you set build automatically), or Project -> Build Project (after cleaning it)