File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Kathy's Book  pg 366 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Kathy Watch "Kathy New topic

Kathy's Book pg 366

Prem Mander

Joined: Nov 06, 2001
Posts: 16
i was just wondering if the method abt reversing string using string buffer's reverse method on pg 366 of her book , the example given there
"StringBuffer sb = new StringBuffer("A man a plan a canal Panama");
System.out.println(sb);//output is"amanaP lanac a nalp a nam A"
is it how it behaves or was it an error
Sridhar Srikanthan
Ranch Hand

Joined: Jan 08, 2003
Posts: 366
I tried and its working normally. What i can suggest is to delete your .class file and recompile your program
Prem Mander

Joined: Nov 06, 2001
Posts: 16
hi sri
thanks for u r instant reply, but was just wondering if you happen to read the pg 366 of kathy's book
may be you would than understand what i meant
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Prem -
Good catch ! Obviously the second line of code should be:
We'll add this one to the errata ! :roll:
(falling on his sword ...)

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: Kathy's Book pg 366
It's not a secret anymore!