Re: How to learning java without pay money?
Tom Anderson wrote:
You can download Thinking In Java for free, and people tell me that's
pretty good:
http://www.mindview.net/Books/TIJ/
Lew wrote:
I somewhat disagree that it's a good book.
I got a lot out of it when I first learned Java, so in that it might
help the OP. However its approach diverges somewhat from mainstream
Java best practices, so it could engender bad habits that are hard to
correct later on.
Tom Anderson wrote:
Could you expand on that? In what ways does it diverge?
Well, it's been a lot of years since I read it, so I had to go back and look
at it again. I notice right away that he plunges into a discussion of
inheritance with a section entitled "Inheritance: reusing the interface" in
which he does not mention interfaces as such, but talks about base classes.
Yes, concrete classes. That isn't thinking in Java at all.
He comes around to interfaces as an afterthought, and presents them as
something that "takes the concept of an abstract class one step further".
This is backwards - the presentation should begin with interfaces and flow to
concrete classes and instances.
It's also not best-practice thinking. It comes so close - talking about types
and /is-a/ vs. /has-a/ and all - but the notion of inheritance these days is
secondary to the notion of interface implementation. You don't really think
in Java most powerfully until you grok type analysis and programming to the
interface, and IMHO introductory material should begin with that.
Don't misconstrue. I don't hate the book. I just don't think it establishes
the correct foundational viewpoint for the most effective Java. But it does
come close, and most of what it says is sound.
Like I say, /Thinking in Java/ is an OK beginner's book but it establishes
some thought patterns that aren't really correct for Java programming, belying
the book's name.
--
Lew