I use this code in netBeans , it’s compilation error .
public class Main
{
public static void main(String[] args)
{
int a2[]={2,3},a3={4,5,3},a4={1,2,3,4};
int a1[][]={a2,a3,a4};
System.out.println(a1[0][1]+","+a1[1][2]+","+a1[2][3]);
}}
the I use the command prompt , and that’s not occurred any error ..
and I obtained this output
3,3,4
a3anda4both variable must be declared as array[]likea3[]anda4[].