improved code:
import java.*;
import java.util.*;
public class prova{
public static void main(String args[]){
Integer arr1[]=new Integer[2];
Integer arr2[]=new Integer[2];
Vector vettore=new Vector();
vettore.addElement(arr1);
arr2=(Integer[]) vettore.elementAt(0);
}
}
> What is the right manner to do it working? and why.
Casting is done when you take something out of a Vectro because
Vectors only store Objects handles. The other method calls were just
wrong. Oh and vectors start counting their elements at 0.