"Not a statement" error?! Help needed with simple java.
Why am I getting a "Not a statement" error when I try to compile here? I'm just trying to make a no-arg constructor that sets the field numbers[][] to those numbers...
I do not believe you can use the curly braces syntax once its been declared and initialized. I may be mistaken on that; it has been awhile since I've done java programming.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
public class Fun {
private static int numbers[][] = {{4,7,3},{2,10,2},{4,5,6}};
public static void main(String[] args) {
Fun f = new Fun();
}
public Fun() {
System.out.println(numbers[1][1]);
}
}