Originally posted by Jothi Shankar Kumar Sankararaj:
Guys,
The code below is what I tried with a 1.5 JRE.
ArrayList a = new ArrayList();
a.add(new Short((byte)22));
a.add(new Integer((int)22.34));
a.add(new Long((int)22.34));
System.out.println(a);
I want to know is this also holds good with a 1.4 compiler?? Ranchers help me please, as I don't have a 1.4 compiler...Can anyopne let me know this??
Yes it would definately work on 1.4 compiler.
But why you asked this question, is there anything which is not present in JDK 1.4 ....
Well Anyways, I can confirm you that it will run smoothly in JDK 1.4 and will give output as [22,22,22]...
Hope it helps you out.