Results 1 to 4 of 4
Thread: Weird array output
- 01-17-2012, 04:30 AM #1
Senior Member
- Join Date
- Jan 2012
- Posts
- 146
- Rep Power
- 0
- 01-17-2012, 04:41 AM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: Weird array output
You have to iterate over the array and print each element instead to pass the array to the println method! another way would be to use System.out.println(Arrays.toString(b))
examples can be found in the internet :D (for example: In Java, how can I print an array of ints? - Yahoo! Answers)
- 01-17-2012, 06:03 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Re: Weird array output
Just adding more.
For arrays within arrays you can use Arrays.deepToString(arr). And also toString() calls on each object in an array of Object[] version.
- 01-17-2012, 06:58 AM #4
Similar Threads
-
System.out.println not printing, weird output
By KonchShell in forum New To JavaReplies: 9Last Post: 03-16-2011, 11:50 AM -
weird output relate to socket programming
By nanshaguo in forum NetworkingReplies: 1Last Post: 03-14-2011, 04:37 PM -
Weird output
By gandalf5166 in forum New To JavaReplies: 2Last Post: 02-28-2010, 09:17 PM -
Seriously weird output
By gandalf5166 in forum Java AppletsReplies: 4Last Post: 02-27-2010, 04:16 AM -
Weird data output
By Shaolin in forum New To JavaReplies: 12Last Post: 12-11-2007, 04:27 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks