File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is there anything developed in java 4 and not run in java 5? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Is there anything developed in java 4 and not run in java 5?" Watch "Is there anything developed in java 4 and not run in java 5?" New topic
Author

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

yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
Hi all,
Is there anything of java 4 doesn't work correctly in java 5? and is there any document said about it?


I love Mozart (^o^)
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5402
    
  13

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


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
Sorry about my mistake. Also thanks for your answer
Nitish Bangera
Ranch Hand

Joined: Jul 15, 2009
Posts: 537

Generics won't run.


[ SCJP 6.0 - 90% ] , JSP, Servlets and Learning EJB.
Try out the programs using a TextEditor. Textpad - Java 6 api
Anne Crace
Ranch Hand

Joined: Aug 29, 2005
Posts: 223
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


SCJP, SCJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5402
    
  13

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

Joined: Apr 05, 2009
Posts: 58
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

Joined: Oct 14, 2002
Posts: 8829
    
    5
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.


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
yen hoang
Ranch Hand

Joined: Apr 05, 2009
Posts: 58
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 !!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there anything developed in java 4 and not run in java 5?