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

Question #20037
54. Where is the error in this code sequence? (This code compiles and runs, but outputs garbage.)
int [ ] [ ] a = { { 3, 26, 48 }, {5, 2, 9 } };
System.out.println( "The array elements are " + a );
1
Expert's answer
2012-12-05T10:04:25-0500

You must write: System.out.println( "The array elements are" + a[0][0] );

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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS