Skip to content
Related Articles

Related Articles

Java | Arrays | Question 6
  • Last Updated : 17 Jan, 2014

Output of following Java program?

class Test
    public static void main (String[] args) 
        int arr1[] = {1, 2, 3};
        int arr2[] = {1, 2, 3};
        if (arr1 == arr2) 
            System.out.println("Not same");

(A) Same
(B) Not Same

Answer: (B)

Explanation: See

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :