Well I'm trying to initialize more than one array using this method and it gives me this error as mentioned: Any solutions
int [] x,y,z=new int [10];
System.out.println("The first element of x:"+x[0]);
System.out.println("The second element of y:"+y[1]);
System.out.println("The third element of z:"+z[2]);`
And the error is:
ex1.java:47: error: variable x might not have been initialized
System.out.println("The first element of x:"+x[0]);
^
ex1.java:48: error: variable y might not have been initialized
System.out.println("The second element of y:"+y[1]);
^
2 errors