[note] Printing Array in Java


/ Published in: Java
Save to your folder(s)

Must use deepToString() to print elements in an array.

Reference(old-toString()): http://stackoverflow.com/questions/16217452/why-wont-my-array-print-out-correctly


Copy this code and paste it in your HTML
  1. import java.util.Arrays;
  2. public class Practive{
  3. public static void main (String[] args)
  4. {
  5. int [][] array = {{3,4,5},{6,7,8}};
  6. System.out.println(Arrays.deepToString(array));
  7.  
  8. }
  9.  
  10. }

URL: http://stackoverflow.com/questions/16217452/why-wont-my-array-print-out-correctly

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.