Possible Duplicate:
Simplest way to print an array in Java
How do I even print arrays? I'm trying to experiment on some methods and all I keep on getting are garbage values. I tried to import the Arrays library - still didn't work.
    int []x = {1, 2, 3, 4, 5};
    int []y;
    y = x.clone();
    System.out.println(x);
    System.out.println(y);
 
     
     
    