Java Forum / First Aid / March 2008
Which book to choose?
Santosh Krishnan - 19 Mar 2008 17:14 GMT Hello,
I have done some programming with GW-BASIC and Borland Turbo Pascal during school. I don't know C or C++. Now I have to learn Java for a course, and I have short-listed three books from the local library. Can anyone give me some advice or thoughts on which one to start with? Suggestions for any other beginning Java book will also be greatly appreciated.
Sams Teach Yourself Java In 21 Days by Laura Lemay, Charles L. Perkins and Michael Morrison. ISBN 1-57521-183-1.
Thinking In Java (3rd Ed.) by Bruce Eckel ISBN 0-13-027363-5.
Java How To Program (4th Ed.) by Deitel & Deitel.
Or should I start with the online Java tutorials at <http:// java.sun.com/docs/books/tutorial/>?
Thanks for any help.
Alex.From.Ohio.Java@gmail.com - 19 Mar 2008 17:52 GMT On Mar 19, 12:14 pm, Santosh Krishnan <quaeritate- selco...@yahoo.co.in> wrote:
> Hello, > [quoted text clipped - 16 lines] > > Thanks for any help. Thinking In Java is good one. Teach Yourself Anything In 21 Days - throw away.
http://www.myjavaserver.com/~alexfromohio/
Stefan Ram - 20 Mar 2008 19:13 GMT >Thinking In Java is good one. Recently someone claimed that "Thinking in Java 3", contained this sentence:
|If you're defining an anonymous inner class and want to use an |object that's defined outside the anonymous inner class, the |compiler requires that the argument reference be final, like |the argument to dest(). Here, Eckel writes:
»object that's defined«.
Objects, however, are not "defined", they are /created/ at run-time. Names of reference variables are being /declared/ in the source text, not "defined". http://java.sun.com/docs/books/jls/third_edition/html/statements.html#5920
Then, he continues to write
»argument reference be final«.
This might intend to say that a reference parameter was declared with "final". "final" is not an attribute of a, /reference/, but of a variable.
However, this is not about /arguments/ (the reference arguments do not have to be declared "final" here), but about /parameters/. The distinction between these two Java terms seems to be unknown to Eckel.
parameter:
http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.8.7
arguments:
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12
He also writes:
»the compiler requires«.
It might be the case that the compiler of Mr. Eckel indeed requires this, but he should teach a language instead of an implementation, so it might be preferable to write "the language specification requires«.
Also, anonymous inner classes are not being /defined/ in Java, as Eckel writes at the beginning of the quotation, but they are being /declared/.
Moreover, "anonymous" is an unnecessary restriction, because the assertion is valid for /all/ inner classes. Someone learning by this sentence thus needs to learn anew at another time that this is also valid for non-anonymous inner classes, or he might believe erroneously for an indetermined amount of time, that it is only valid for anonymous inner classes.
Is there a way to improve the sentence? One attempt by me:
A parameter to be used within an inner class of its method needs to be declared »final«.
Even the Java Language Specification itself is easier to read than Eckel (and of course, much more correct):
Any local variable, formal method parameter or exception handler parameter used but not declared in an inner class must be declared final.
http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.1.3
All the reported faults have been found by me within a single sentence chosen at random (I did not read the book, but discovered the sentence in another posting, claiming to quote this sentence from "Thinking in Java".) If one extrapolates this error quotient to the whole TIJ, it gives a horrid impression.
Some books might sell chiefly because the buyer wants to express agreement with their title. When one is learning a foreign language one does not want to think everything in English first and then painfully translate it word-by-word. So one might choose "Thinking in Java" instead of a garden-variety "Introduction to Java", because one longs for the promise given by its title, not suspecting that the author Eckel himself might be far from "thinking in Java".
Mark Space - 20 Mar 2008 19:25 GMT > All the reported faults have been found by me within a single > sentence chosen at random (I did not read the book, but I think we should all be wary of drawing conclusions from a single data point. However, Stefan's experience mirrors my own. I've tried a couple of Bruce Eckel's books, including a read-through of Thinking in Java some years ago, and I found them pretty poor overall, including the Java book. There are better resources available.
Besides what's been mentioned here already (Sun's tutorial and the Javapassion website), I like _Learning Java_ published by O'Reilly. It's a bit thick for someone brand new, and it teaches Java, not programming, but it's generally factually correct, it's examples make sense, and it does hit all the important parts of the API, usually with an example that helps the API make sense. In particular it has a very good explanation of the nitty-gritty of generics.
Also, the Javadoc is an excellent resource, although very hard on the beginner. Search for Java classes with Google and a string like "java classname se 6" to get the latest version. I think I should start adding the JLS to my list of references, just for completeness. It's actually fairly easy to read, most of the time.
Lew - 21 Mar 2008 03:26 GMT > Also, the Javadoc is an excellent resource, although very hard on the > beginner. Search for Java classes with Google and a string like "java > classname se 6" to get the latest version. I think I should start > adding the JLS to my list of references, just for completeness. It's > actually fairly easy to read, most of the time. In order to be a decent Java programmer, much less a master, one will have to become facile with the API Javadocs and the JLS. One might as well begin the adjustment process immediately.
<http://java.sun.com/javase/6/docs/api/> <http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html>
Javadoc is a tool, too. Use it to document one's own code. <http://java.sun.com/javase/6/docs/technotes/tools/solaris/javadoc.html> also s=solaris=windows=.
 Signature Lew
Mark Space - 21 Mar 2008 04:22 GMT > Javadoc is a tool, too. Use it to document one's own code. Yes, that's true. I'm at a lost for a pithy name for Sun's Java documentation. While Javadoc is a tool, a lot of folks do seem to refer to the main documentation as "the Javadoc." Maybe that's not a great idea, but it seldom seems to cause confusion.
Hmmm, maybe "Java doc" (with a space) would be a better phrase for Sun's online documentation....
Lew - 21 Mar 2008 12:26 GMT > I'm at a lost for a pithy name for Sun's Java > documentation. While Javadoc is a tool, a lot of folks do seem to refer [quoted text clipped - 3 lines] > Hmmm, maybe "Java doc" (with a space) would be a better phrase for Sun's > online documentation.... The people have already spoken, and it's "the Javadocs". I don't hold out much hope for you to successfully buck the social momentum.
 Signature Lew
thufir - 29 Mar 2008 00:14 GMT > Besides what's been mentioned here already (Sun's tutorial and the > Javapassion website), I like _Learning Java_ published by O'Reilly. I really like:
http://www.oreilly.com/catalog/hfjava2/
It seems silly, but their silly technique of, well, silliness, works. I only wish they would write a book a week! I read the first edition, but I'm sure that the second edition is better. Does it cover generics, I wonder?
-Thufir
Mark Space - 19 Mar 2008 19:42 GMT > I have done some programming with GW-BASIC and Borland Turbo Pascal > during school. I don't know C or C++. Now I have to learn Java for a
> Java How To Program (4th Ed.) by Deitel & Deitel. I don't like any of these books, really. Deitel tends to get the highest marks from the most folks, in my experience.
Doesn't this class have a text book? I'd use that, at least you can follow along. If you want supplemental advice, the tutorials on Sun's website are probably the best source of free, supplemental type info on Java and it's various APIs.
Santosh Krishnan - 20 Mar 2008 08:58 GMT > > I have done some programming with GW-BASIC and Borland Turbo Pascal > > during school. I don't know C or C++. Now I have to learn Java for a [quoted text clipped - 7 lines] > website are probably the best source of free, supplemental type info on > Java and it's various APIs. Yes we have been prescribed a textbook called SL-275 but it has only one complete example. Everything else is just code snippets. Unfortunately the teacher isn't very good too. But thanks for your suggestion, Sun's tutorial seems the best option at the moment.
Mark Space - 20 Mar 2008 17:49 GMT > Yes we have been prescribed a textbook called SL-275 but it has only > one complete example. Everything else is just code snippets. > Unfortunately the teacher isn't very good too. But thanks for your > suggestion, Sun's tutorial seems the best option at the moment. OK, that sounds fine. I was just curious what the motivation for a second book was. If you feel you need better instruction, check the javapassion website. It is excellent:
http://www.javapassion.com/
Here's the beginning Java course for that site:
http://www.javapassion.com/javaintro/
thufir - 29 Mar 2008 00:24 GMT > Yes we have been prescribed a textbook called SL-275 but it has only one > complete example. Everything else is just code snippets. Unfortunately > the teacher isn't very good too. But thanks for your suggestion, Sun's > tutorial seems the best option at the moment. I'll be taking
http://www.bcit.ca/study/outlines/comp2611200830
in just a few days!
and the textbook is:
Introduction to Java Programming: Fundamentals First (Paperback) by Y Daniel Liang (Author)
# Paperback: 704 pages # Publisher: Prentice Hall; 6 edition (Jul 11 2006) # Language: English # ISBN-10: 0132237385 # ISBN-13: 978-0132237383
http://www.amazon.ca/Introduction-Java-Programming-Fundamentals-First/ dp/0132237385/ref=sr_1_1?ie=UTF8&s=books&qid=1206746314&sr=1-1
I sure hope that my experience is different! Still waiting for the darn book in the mail. (Bookstores are such a scam at college, thankfully there's Amazon -- assuming the darn thing ever arrives.)
-Thufir
Michael Dunn - 19 Mar 2008 21:12 GMT <snip>
> Or should I start with the online Java tutorials at <http:// > java.sun.com/docs/books/tutorial/>? not a bad place to start (you can download the tutorial)
as for books, "Head First Java" is worth looking at read user comments here http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208/ref=pd_bbs_sr_1 ?ie=UTF8&s=books&qid=1205957408&sr=1-1
Hal Rosser - 19 Mar 2008 22:41 GMT > Hello, > [quoted text clipped - 4 lines] > Suggestions for any other beginning Java book will also be greatly > appreciated. I suggest this one: http://www.murach.com/books/jse6/index.htm and work through the book.
Charles Hottel - 20 Mar 2008 00:45 GMT > Hello, > [quoted text clipped - 16 lines] > > Thanks for any help. You can download Thinking in Java (3rd ed) free from: http://www.mindview.net/Books/TIJ/
Roedy Green - 20 Mar 2008 04:19 GMT On Wed, 19 Mar 2008 09:14:28 -0700 (PDT), Santosh Krishnan <quaeritate-selcouth@yahoo.co.in> wrote, quoted or indirectly quoted someone who said :
>Can anyone give me some advice or thoughts on which one to start with? see http://mindprod.com/jgloss/gettingstarted.html
 Signature
Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
Santosh Krishnan - 20 Mar 2008 14:09 GMT On Mar 19, 9:14 pm, Santosh Krishnan <quaeritate-selco...@yahoo.co.in> wrote:
> Hello, > [quoted text clipped - 16 lines] > > Thanks for any help. Thank you to everyone who responded. I have chosen to start with the tutorials developed by Sun and consider getting a book a bit later. I'll keep all your suggestions in mind.
Chase Preuninger - 30 Mar 2008 23:13 GMT Core Java By Cay Horstmann and Gary Cornell
http://groups.google.com/group/java-software-develoupment?hl=en
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|