Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is there anything developed in java 4 and not run in java 5?

 
yen hoang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there anything of java 4 doesn't work correctly in java 5? and is there any document said about it?
 
Roel De Nijs
Sheriff
Posts: 10386
132
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yen,

Don't think this is the appropriate forum to ask such a question, because for the SCJD you have to use jdk 1.5 or jdk 1.6. So the 1.4 is out of the question.

As far as i know there is nothing from Java 1.4 that won't run in java 1.5. The only thing you have to watch out for (and i can think of) is this code:

because the enum is a java keyword since java 1.5

Kind regards,
Roel
 
yen hoang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about my mistake. Also thanks for your answer
 
Nitish Bangera
Ranch Hand
Posts: 537
Eclipse IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generics won't run.
 
Anne Crace
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the enhanced "for" loop is new to 5, also. I think you have to use Java 6 at this point, to be quite honest. Fortunately 6 didn't introduce too many new changes. 5 was huge, however and I strongly suggest to yen to do some research on Java 5
 
Roel De Nijs
Sheriff
Posts: 10386
132
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I think his question was: can you write code in Java 1.4 that won't run in Java 1.5, not the other way around (of course generics and the enhanced for-loop won't compile in Java 1.4)

Kind regards,
Roel
 
yen hoang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:Hi all,

I think his question was: can you write code in Java 1.4 that won't run in Java 1.5, not the other way around (of course generics and the enhanced for-loop won't compile in Java 1.4)

Kind regards,
Roel

I can't agree any more with you
 
Bert Bates
author
Sheriff
Posts: 8900
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't think of anything in J2SE that fits into that category. The closest thing would be that before 1.4 "assert" could be a variable name, and starting with 1.4 it's tricky to use "assert" as a variable name.
 
yen hoang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bert Bates wrote:I can't think of anything in J2SE that fits into that category. The closest thing would be that before 1.4 "assert" could be a variable name, and starting with 1.4 it's tricky to use "assert" as a variable name.

Thanks for your answer, and also your book (Sun Certificated Programmer for Java 6 study guide)
Because of it, I passed SCJP with high result!!!
Thanks so much !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic