I am trying to turn an ArrayList into a List, but every time I try to run the code, I receive 3 [Ljava.lang.Integer;@10613c5c[I@145eaa88, I know the 3 is int t, but I have no idea what the random String afterward is.
int t=0;
int test []= {1,2,3,4};
ArrayList<Integer> x=new ArrayList<Integer>();//Making an ArrayList.
x.add(10);//Adding to the ArrayList.
x.add(67);
x.add(12);
Integer[] array = new Integer[x.size()];//Code I got from this website from another question.
array = x.toArray(array);
for(int i=0;i<x.size();i++)//int t is the size of the ArrayList.
{
t++;
}
System.out.println(t+" "+array+""+test);//This is the problem.