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" );
1
Expert's answer
2012-12-05T10:30:33-0500
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" ); }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment