How do I pass an array to a method, where the method set the dimension and
populates the array. I would like to do something like:

int x[];
changeValue(x);
System.out.Println(""+x[0]);
System.out.Println(""+x[1]);

public void changeValue(int x){
x[]=new int[2];
x[0]=1;
x[1]=2;
}

Similar to the VB way of ReDim an array. Is this at all possible in Java?

Cheers,
Joakim