• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java 1.4 differences...  RSS feed

 
Dan Silva
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've been interviewing with a company that is still using Java 1.4. I recently became certified in 1.5, and was wondering what the differences are between the two releases. I know about generics, autoboxing, and that PrintWriter can take a String as an arg for its constructor, but is there anything else huge I should know about? Thanks.
 
Anshul Malpani
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya there is a Big difference... In java 1.4 You have only Classes, Interfaces

But in Java 5 we have added with Anotations,Enum these are the big feature in java 5.
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Annotations, enums, generics and the new for loop structure are the biggest changes in the language specification.
Then there are additional classes, with StringBuilder (non-synchronized version of StringBuffer) as one of the most important, and additional methods to existing classes (such as timeout methods on java.net.URLConnection).
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37465
539
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are also some minor library changes like string.contains() being introduced.

If you know Java 5, you will be fine in Java 1.4. Yes, you can't use some features. But you can also show in the interview how this knowledge is a good thing for them - I bet you know more about Java 5 than most of their current employees. When it comes time to migrate to Java 5, you would be a very useful person to have on the team.
 
Talha Bin Hussain
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There are few big difference between JDK 1.4 and Jdk 1.5:

Generics—Provides compile-time type safety for collections and eliminates the need for casting every time you get an object out of Collections.
Enhanced For loop—Eliminates error-proneness of iterators.
Autoboxing/unboxing—Eliminates need of manual conversion between primitive types (such as double) and wrapper types (such as Double).
Typesafe enums—Provides all benefits of the Typesafe enum pattern.
Static import—Eliminates the need for using class names prior to using the static member variables of other classes. This will make the code a bit neater.
Metadata—Allows programmers to avoid writing boiler plate code and gives the opportunity for declarative programming.
Serialization Support has been added to handle enumerated types which are new in version 5.0. The rules for serializing an enum instance differ from those for serializing an "ordinary" serializable object.
The Math and StrictMath libraries include hyperbolic transcendental functions (sinh, cosh, tanh), cube root, base 10 logarithm, etc.

For Complete deatils about the new feature of Jdk 1.5 refer to the link.
[URL=http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html]Jdk 1.5 features[/url]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!