I have used 2d arrays many times before, but for some reason eclipse keeps putting a red line under ; at the end of the declaration line for it. When I run it I get an unresolved compilation error. Here is my code:

private Zone[][] zones = new Zone[10][10];

What is going on here?

5 Years
Discussion Span
Last Post by JamesCherrill

What compiler errors do you get when you try to compile the program?
Try using the javac command to compile the program and see what error messages it gives.


Exception in thread "main" java.lang.Error: Unresolved compilation problem:


I've been seeing a lot of problems with OPs using IDEs that are not giving good/full text error messages lately. When I use the javac command to compile these programs I get better error messages than the OP is getting from his IDE. Is the problem that the OPs do not have some options turned on that would give the better error message or that they don't know how to use the IDE (hover the cursor over ...)

Edited by NormR1

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.