• +91 9723535972
  • info@interviewmaterial.com

Java Interview Questions and Answers

Question - The following statement prints true or false, why?

Answer - byte[] a = { 1, 2, 3 };, byte[] b = (byte[]) a.clone(); System.out.println(a == b); The false will be printed out. Because the two arrays have distinctive memory addresses. Starting in Java 1.2, we can use java.util.Arrays.equals(a, b) to compare whether two arrays have the same contents.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners