• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about my mistake. Also thanks for your answer
 
Ranch Hand
Posts: 537
Eclipse IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generics won't run.
 
Ranch Hand
Posts: 223
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !!!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic