What will the following lines print?
int[] array = {1,2}; 
System.out.println(array);
Explanation
Array object does not print its content by default, just like any other object in java it prints array class identifier followed by hex hashcode .
Java
Java Quiz
Start Quiz

or Read more about Java Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback