Posted By

cetnar on 07/09/06


Tagged

arrays toString tiger


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

xaviaracil


Arrays.deepToString()


 / Published in: Java
 

Here's the output:

     [java] [[X, O, O], [O, X, X], [X, O, X]]

There are similar methods: - Arrays.deepHashCode - Arrays.deepEquals

  1. String[][] ticTacToe = { {"X", "O", "O"},
  2.  
  3. {"O", "X", "X"},
  4.  
  5. {"X", "O", "X"}};
  6.  
  7. System.out.println(Arrays.deepToString(ticTacToe));

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: rajeshv on October 3, 2007

first time come to know this utility.

Learned one more thing.

Thanks,

You need to login to post a comment.