63 800
Assignments Done
99,5%
Successfully Done
In August 2018

Answer to Question #20029 in Java | JSP | JSF for nohra

Question #20029
Where is the error (although this code will compile and run) in this code sequence?
int a[ ] = { 3, 26, 48, 5 };
int b[ ] = { 3, 26, 48, 5 };
if ( a != b )
System.out.println( "Array elements are NOT identical" );
Expert's answer

You must write next solution:

int a[ ] = { 3, 26, 48, 5 };
int b[ ] = { 3, 26, 48, 5 };
if (!Arrays.equals(a, b) ){
System.out.println( "Array elements are NOT
identical" );
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions