I am trying to define a nested class using Eclipse....
public class Xxx {
private boolean[][] grid;
private boolean OPEN = true;
private Site[][] s;
class Site() {
private int val;
Site() { // empty constructor
}
}
public Xxx(int N) {
........
}
.......
}
On the line defining the inner class, Site, I get an error...
Multiple markers at this line - Syntax error on token "class", @ expected - Syntax error, insert "}" to complete Block
Is my syntax wrong? I don't understand the message.
Remove the ()
:
class Site {
// ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With