Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What are the noteworthy changes in Java since 1.2?

Options
  • 30-06-2005 12:35pm
    #1
    Moderators, Entertainment Moderators Posts: 17,993 Mod ✭✭✭✭


    When I last used Java properly, it was just in its 1.2 infancy. I'm shortly going into Java development after a somewhat prolonged absence, and am wondering what are the quintissential differences that I should be aware of? Sure, Sun list all the changes but from a day-to-day point of view, what basics have been changed or what techniques should I be particularly aware of?

    I know Collections are bigger than they once were for example - would they typically have replaced arrays or are arrays still a preferred simpler method with less overhead?

    Has the JDBC API changed much in its fundamentals (not just having new ancillary libraries, which I'd expect)? I'd assume also that XML parsing, etc, is a fundamental concept now rather than the esoteric mystery it was originally - have any of the two parsing methodologies - DOM and SAX - claimed victory? Et cetera.

    I realise it's a pretty open question, so I'm just looking for some general pointers on what I should be aware of as my primary source of info. is Sun's Java tutorial and it doesn't really seem to be update, particularly with the 1.5 release now out.


Comments

  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Erm not sure exactly but usually I try to stay away from arrays. Try array lists perhaps. Good and dynamic :D


  • Registered Users Posts: 1,865 ✭✭✭Syth


    One nice change in 1.5 (I think) is 'autoboxing of primitive data types' So if you have a data structure (like java.lang.Vector) of ints, previously you had to cast them to Integers, and back again. Now it's done automatically. Nice. And I think there's a foreach block.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Assertions?


  • Moderators, Entertainment Moderators Posts: 17,993 Mod ✭✭✭✭ixoy


    Syth wrote:
    One nice change in 1.5 (I think) is 'autoboxing of primitive data types' So if you have a data structure (like java.lang.Vector) of ints, previously you had to cast them to Integers, and back again. Now it's done automatically. Nice. And I think there's a foreach block.
    Yup, I read that. And enumerations as well, which previously I remember implenting via an interface, which always seemed a bit cumbersome. I know some of the 1.5 changes alright, but I don't know the significant day-to-day changes in 1.3 or 1.4, although they may again be just by way of adding more and more libraries. I just don't want to appear too clueless and start having deprecation warnings coming up when I compile code soon :o


  • Registered Users Posts: 2,426 ✭✭✭ressem


    Adding printf() in 1.5

    Never felt like a proper language till then.


  • Advertisement
  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    ixoy wrote:
    I know Collections are bigger than they once were for example - would they typically have replaced arrays or are arrays still a preferred simpler method with less overhead?

    No. Arrays are still prefered, if they make sense in the situation.
    ixoy wrote:
    Has the JDBC API changed much in its fundamentals (not just having new ancillary libraries, which I'd expect)?

    No, new features have been added, but it's similar enough really.

    As to other stuff, what everyone else said, plus there are now templates. (as of 1.5)

    Really, though, the most dramatic change was from 1.1 to 1.2


Advertisement