Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3500646
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:45:35+00:00 2026-05-18T12:45:35+00:00

I am a long-term user of Java (but I am a scientist and not

  • 0

I am a long-term user of Java (but I am a scientist and not a professional developer) . I upgrade whenever new versions come out but often I only use a small portion of the new features at first as I don’t always have time to study everything.

Recently I learned that unless I fully understood generics I was likely to have serious dangers in using (or in this case not using them) – dangers which I was unaware of and which are not obvious. (I appreciate that I was warned by Eclipse but I didn’t understand the warning!)

The particular case in point was that it is now (since 1.5) bad practice to use raw types and that Class (rather than Class<?> or Class<MyStuff>) had serious dangers. see Why is Class<?> preferred to Class.

My question is – what others dangers am I likely to encounter and be unaware of as a result of upgrading to Java 1.5 (or 1.6, 1.7) but using my old code or style of programming?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:45:36+00:00Added an answer on May 18, 2026 at 12:45 pm

    I’ll speak about the converse (i.e. the benefits):

    I’m not aware of dangers (and I’ve ported Java 1.4 codes to Java 6 without hickups as well as java 5 codes to java 6, java meaning JDK). As for warnings, it’s basically a warning (since your code will compile) and you are free to resolve these warnings.

    As for as Generics is concerned, Generics are used for Compile-time checking by the compiler, i.e. once the compiler has the element type (e.g. in Collection), it can see whether you have used the object correctly with the correct cast.

    Generics are implented by type erasure. They are present only at compile-time after that the compiler erases it. This is to provide interoperability with legacy codes which uses raw types (e.g. List in JDK 1.4).

    I don’t know if these would be the dangers, but it wouldn’t affect your JDK 4 applications:

    • Autoboxing
    • Enums
    • Varargs
    • foreach
    • Annotations

    And you have better performance of the Java Collections Framework.

    PS the only problem migrating from JDK 1.4 to a new JDK (5 and higher) is you’ll face issues with enum (as it is a reserved keyword from JDK 5 and higher). OTher than that, you’re ok.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems that Silverlight/WPF are the long term future for user interface development with
I've had this long term issue in not quite understanding how to implement a
Long winded title, short question: If one wants to develop for Windows but not
One long term project I have is working through all the exercises of SICP.
Long ago I tried to sort out my system between local, web server and
Long time ago, the Game Developer magazine published an article about ID Software and
Having problems getting the different arrays content from geocoder results. item.formatted_address works but not
long, long ago in a galaxy far far away, You used to be able
Long story short, I have a substantial Python application that, among other things, does
Long time listener, first time caller. I'm a full time SE during the day

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.