File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes deprecated getBytes question 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 » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "deprecated getBytes question" Watch "deprecated getBytes question" New topic

deprecated getBytes question

Samual Harvey
Ranch Hand

Joined: Aug 06, 2002
Posts: 119
Please let me know which one of the following is correct.

Original code:-

Should I modify it like :-

or should I modify like this:-

[ September 26, 2002: Message edited by: Samual Harvey ]

Samual Harvey<br />SCJP2<br />SCJD2
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
i modified it by second way
Samual Harvey
Ranch Hand

Joined: Aug 06, 2002
Posts: 119
Do we have more comments on this.
Padmaja Prasad
Ranch Hand

Joined: Nov 14, 2001
Posts: 76
I replaced


Samual Harvey
Ranch Hand

Joined: Aug 06, 2002
Posts: 119
I am still not sure which one of the two to use. Is there a way I can test this.
I think I can use 2nd as follows:-
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Samual,
I did it like Padmaja. It just seems like a cleaner way to do it. But that's just opinion.

Michal Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: deprecated getBytes question
It's not a secret anymore!