What is wrong with this definition? I want to declare a two dimensional array with those numbers:
int[][] arr = [[1,2,3],[1,2,3],[1,2,3]]; I get this error:
Type mismatch: cannot convert from int to int[] Should be:
int[][] arr = {{1,2,3},{1,2,3},{1,2,3}}; More information is available on JLS, see 10.6. Array Initializers:
An array initializer is written as a comma-separated list of expressions, enclosed by braces { and }.
You might also want to have a look at a basic tutorial, it'll help you a lot.