After executing below code, I feel Arrays.asList returned reference to source array thats y after printing it showing the final content from source array.
String[] circus2 = { "Monkey", "Elephant" };
List<String> zoo2 = Arrays.asList(circus2);
circus2[1] = "bear";
System.out.println("zoo2 size: " + zoo2.size());
System.out.println("zoo2 : " + zoo2);
====
zoo2 size:2
zoo2 : [Monkey, bear]
Please advice me, if i m wrong. Java Document says it returned "Returns a fixed-size list backed by the specified array.".
ArrayListis always backed by an array of elements.