Duane said:
The first book on Java a person buys has all the language components. This
means that the student sees almost as many abstract classes as normal
classes. Equal weight is given to every topic.
Its the _second_ book that teaches programming style: eg. initialize class
variables when declared versus in the constructor. What would you
recommend as good second books to buy?
TIA
Duane
For a first book I recommend the Java Programming Language from Sun
(some have called it the K&R of Java books). My personal preference in
learning a language is to have the most concise reference for the
language. During my college C class I used K&R and much to the marvel
of those around me it had everything needed at the time (after all it
did present the entire language with out any filler) and was a very
often borrowed book despite those same people investing in much larger
books.
I don't understand the idea of 'topics' but the language is definitely
limited and so someone can learn the language in full. Topics on the
other hand proliferate with every new problem and solution one can
imagine.
I agree strongly with Mr. Luc The Perverse. Doing is very important
and in my experience fooling yourself with a verbose book is not the
way to do it. There are so many people saying I know X because I read
Y. The first book is by far the more important... it you want the book
to instruct others they are best served with a complete reference book
following the rule of thumb that is "should be made as simple as
possible, but not simpler."
After the first book... well then you are looking for a book to soak in
I suppose... to read for ideas and insight... if this is for a Computer
Science student who is still learning and would have taken C or C++
then Thinking in Java, currently the 4th edition would be a good
choice. It is a good choice because it connects C++ elements with Java
to differentiate and it provides a good deal of depth on issues (for
someone who somehow only managed to learn Java, references to other
programming languages may prove distracting). It isn't the kind of
book a normal person would read from cover to cover it is just what I
said the kind of book you soak in to get new ideas. After that...
Well I suppose you are ready for the 'Classics' like Design Patterns or
books on Data Structures (never a waste of time) or books on
Threading... mean while I expect you will be swimming around at all
times in the API of your choice trying to get someplace.
One more thing for anyone starting... Learning programming is not an
orderly process you need to solve problems and that means using what
ever references you can get your hands on. Don't say if I read X then
Y I'll be really good... might be true it you understand X and Y fully
but how will you know? What would be the point if it isn't to set out
to build what you want... that is why we became interested in the first
place right to create? So go off and start building what ever it is
you are interested in building!