Java 1.4 vs Java 1.6

Discussion in 'Software' started by cartfredri, Oct 9, 2010.

  1. cartfredri

    cartfredri

    Joined:
    Oct 9, 2010
    Messages:
    1
    im just going through a research at university and just wanted some advice on java. Bassically i wanted to know why java 1.6 features offer better and improved functionality than Java 1.4ā€™s features.
     
    cartfredri, Oct 9, 2010
    #1
    1. Advertising

  2. cartfredri

    thornmath

    Joined:
    Oct 10, 2010
    Messages:
    2
    Java 1.6 is better than 1.4

    Java1.4 is quite old, so just in general - when you have software that is frequently updated, using a 4 year old product is a bad idea. Here are a few specifics:
    1. Java1.4 and earlier didn't use generics or autoboxing. So if you have an ArrayList of Integers, you cannot simlpy do list.add( 78 ) since 8 is an int. You need list.add(new Integer( 78 ));
    With generics we can create an ArrayList of, say, Student objects, and then the .get method returns Student instead of Object.
    2. The Scanner class makes it much easier to quickly parse data from a text file or the command line.
    3. Annotations are supported in 1.6
    I found this very helpful when creating a web service or web application.
     
    thornmath, Oct 10, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fernando Kohan

    JAVA VIRTUAL MUCHINE OR SUN JAVA

    Fernando Kohan, Nov 13, 2004, in forum: Firefox
    Replies:
    1
    Views:
    916
    Clark
    Nov 14, 2004
  2. dakine

    MS Java or Sun Java???

    dakine, Jul 20, 2004, in forum: Computer Support
    Replies:
    9
    Views:
    1,476
  3. emerald
    Replies:
    3
    Views:
    12,797
    The Modfather
    May 14, 2006
  4. chuck

    Firefox and Java - but no Java

    chuck, Mar 19, 2007, in forum: Firefox
    Replies:
    1
    Views:
    379
    Peter.Potamus.the.Purple.Hippo@gmail.com
    Mar 19, 2007
  5. -Dan-
    Replies:
    0
    Views:
    566
    -Dan-
    Aug 5, 2005
Loading...

Share This Page