File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the difference" Watch "what is the difference" New topic

what is the difference

Andrew Lit
Ranch Hand

Joined: Jul 01, 2002
Posts: 135
i'd like to know why is there a difference between:
byte[] hallo={75,15,25};
Ilja Preuss

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:
subject: what is the difference
It's not a secret anymore!