I know that C++ simplified quite a bit since it was made, and im looking into teaching myself JAVA and have a book published in 2001, would i be handicapping myself if i learned a much older version?
by this i mean in C++, i noticed older books didn't run "using namespace std", it would instead use std:: everytime someone wanted to call a function from th开发者_运维技巧e library.
Thanks in advance!
The fundamentals of Java haven't changed.
Things have been introduced that you need to be aware of:
- Generics
- Autoboxing
- java.util.Concurrent package
- string.split() vs StringTokenizer
there's others, and these have a very signifnicant impact on every-day Java development.
For the basics, though, an older book should be just fine. Just be aware of changes, like with any set of libraries, and adapt as necessary. Take what you read with a grain of salt, and when you find a better method (generics vs Objects everywhere, for instance) don't be afraid to replace methodoliges.
Generics alone are reason enough to learn a later version. Many of the old idioms that generics replaced (e.g. cross-your-fingers-and-cast-to-Object
) are now avoided.
As Bozho mentions above in a comment, it has changed quite a bit. There are enumerations, static imports, autoboxing, generics, annotations, varargs, and a whole host of new API's. It won't hurt you to read the old book, but I'd definitely pick up a new one or do some reading online after reading it.
Short answer: Yes
Long answer: 10 Years is a hell lot of time, esp. in computer business. There where a lot of changes in the api/runtime library as well as in the language itself. Just go to sun ^h oracle and check the changelogs to see how much changed (it was really much).
精彩评论