File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Head First 2nd edition Code Magnets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Head First 2nd edition Code Magnets" Watch "Head First 2nd edition Code Magnets" New topic
Author

Head First 2nd edition Code Magnets

Ted Kaz
Greenhorn

Joined: Mar 09, 2005
Posts: 3
Before I give away the ranch with a dash of code. Is it possible that the Code Magnets scramble on page 20 have a certain line of code that needs to be duplicated to get the proper output?
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

You are correct. One of the magnets needs to be used twice in order to produce the correct results. This is not reflected in the solution shown on page 25. (Entering the code on pg 20 does result in incorrewct ouput). The "problem" then becomes by reusing that one magnet, the while loop beomces unneccessary since you only "loop" through it one time.
Ted Kaz
Greenhorn

Joined: Mar 09, 2005
Posts: 3
You have no idea how good that makes me feel :-)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Head First 2nd edition Code Magnets
 
Similar Threads
TestThreads Code Magnets exercise Head First Java
HFSJ page 380
SCWCD Study Companion - Practical vs. Knowledge
HF and the magnets
Spam?