• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on JDK version  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys I'm new on Java environment and I started my path from an old book on Java5. Now I have a new pc so I was wondering if I can just install jdk 8 and be fine writing code thought for Java5.
 
Marshal
Posts: 4053
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mostly yes, although I would recommend you learn from a newer book. A lot has happened to Java in the last decade.
 
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes and if you want to run that code on a machine which only has Java 5 installed on it you can even set a compiler switch so that the compiler generates output for Java 5. You will of course only be able to use features that were available in Java 5.
 
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the book Head First, what is wrong with using an old book and learning newer features later?
 
Pier Maccà
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for the replies, I know I will have to learn many new features after completing the assignments on this book, but I thought that learning new things could eventually be a good opportunity to repeat the old ones once more.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pier Maccà wrote: . . . learning new things could eventually be a good opportunity to repeat the old ones once more.
That sounds good. You can simply write Java5 code on a Java8 JDK and it will run nicely.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are relatively little changes made between versions of Java and the language remains mostly backwards compatible. You can use an old book if you have it but for newer features use a new book.

If you get a new book, it is always very easy to download the most current release so that you do not look at a book for a higher version than you have installed.
 
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm with those who suggest a more current book. I'm often advised that whole parts of the Java API (Observer/Observable, for example, although even saying that much will probably provoke its defenders ) have been replaced by better stuff. The older options are still there for backwards compatibility, but using them for new code probably isn't a good thing to do.

Java is the most dynamic language I've ever used. It changes all the time, so being "obsolete" is, in a sense, almost unavoidable. But starting with the current version is, I think, still your best choice.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never realised you can get as much disagreement in old books vs new books as you can about whether to put { on a line by itself
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:I never realised you can get as much disagreement in old books vs new books as you can about whether to put { on a line by itself

Nonsense, Campbell. There is no disagreement about that. There are simply those who are right, and those who are wrong.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is very nice of you, Stevens. I am of course right
 
Tim Cooke
Marshal
Posts: 4053
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Speak for yourself Campbell
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Speak for yourself Campbell

Speaking for myself: what Tim said.
 
Pier Maccà
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*ahem* to return (kinda) on topic, what resources (I mean organized resources with assignments, if possible) on java 8 would you guys recommend?
 
Stevens Miller
Bartender
Posts: 1445
30
C++ Java Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pier Maccà wrote:*ahem* to return (kinda) on topic, what resources (I mean organized resources with assignments, if possible) on java 8 would you guys recommend?

Glad we're past the "which version" question .

I'd download Netbeans, which is a fine IDE, and follow the Java Tutorials to get started.
 
Campbell Ritchie
Marshal
Posts: 56610
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look through our book review pages.
Look through our Java8 forum and see what books people liked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!