Monday, December 28, 2009

Java: Print array contents in one line of code

Java 5+ only, and I didn't even know this method exists after these few years of java ;)

http://stackoverflow.com/questions/409784/simplest-way-to-print-an-array-in-java

System.out.println(Arrays.toString(array));

No comments: