954,545 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Generics?

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?

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

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.

server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
 

Thanx for clarifying that kiddo.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 
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?

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You