Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

java e-books

Thread view: 
hisam - 20 Aug 2006 19:25 GMT
Please suggest a good e-book for a java beginner. Thanks.
Massimiliano Candini - 20 Aug 2006 19:52 GMT
thinking in java :)

> Please suggest a good e-book for a java beginner. Thanks.
Stefan Ram - 20 Aug 2006 21:26 GMT
>thinking in java

 Recently someone claimed that "Thinking in Java 3", 8
 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 to
 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 the
 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".
David Segall - 21 Aug 2006 05:48 GMT
>Please suggest a good e-book for a java beginner. Thanks.
Test drive about 10 of them for two weeks free
<https://ssl.safaribooksonline.com/tryitfree>


Free Magazines

Get 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 ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.