aspose file tools*
The moose likes Beginning Java and the fly likes what is the difference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the difference" Watch "what is the difference" New topic
Author

what is the difference

Andrew Lit
Ranch Hand

Joined: Jul 01, 2002
Posts: 135
hallo,
i'd like to know why is there a difference between:
byte[] hallo={75,15,25};
System.out.println(hallo);
System.out.write(hallo);
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
The write method puts the bytes from the array directly into the stream, whereas println calls the toString method of the array and puts the bytes representing the resulting String into the stream.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the difference
 
Similar Threads
assert
What's a contactor ?
Custom tags ch8 vs. EL functions ch9
New Entity with an existing primary key.
Java as Filtering Web Content