Member Avatar for iamthwee

How can I put this?

Is generics only supported by the very recent versions of java?

If so... Does that mean if I use it, it might not work for people who have older versions of the JVM, or java plugin or whatever it is?

Recommended Answers

All 5 Replies

It's supported by >= 1.5.

Anything written in 1.5 (no matter how the syntax is written) will not work on <= 1.4 machines. I've tried adding source flags and doing a bunch of other stuff and it never made it an actual 1.4 program. The JVM implementation details will always be different. So no, it will not work on older versions of java.

Member Avatar for iamthwee

Thanx for clarifying that kiddo.

Member Avatar for iamthwee

Thanx for clarifying that kiddo.

Hmmm...In that case, if I'm designing a program to be eventually released into the public domain, would it be unadvisable to be using generics...do ya think?

no, since there is no reason for most of your potential users not to have a 1.5 JVM installed.

There are a few operating systems that don't have one available, but not a lot of people use those, certainly not a lot of people using public domain software.

and yes, I know that sounds elitist ;)

But the platforms that don't have a 1.5 JVM are mainly mainframe and big Unix servers running things like AIX and OpenUnix.
Those run mainly custom software.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.