System.out.println (short for Print Line) puts a newline char at the end whatever it prints, so you get one array element on each line.
System.out.print does the same as System.out.println but does not add the newline, so that's the one you need. You'll then need to do your own newline "\n" at the end of each row.
To get rid of the nulls, you need to ensure that every element contains a valid String (eg " ");
Last edited by JamesCherrill; Apr 18th, 2009 at 10:13 am.
Reputation Points: 1907
Solved Threads: 950
Posting Expert
Offline 5,768 posts
since Apr 2008