| Author |
whizlab question for SCJP1.5
|
Nazeer Ahmed
Greenhorn
Joined: Aug 05, 2006
Posts: 21
|
|
Hi In whizlabs fpr SCJP1.5 i got a question Vector<Integer> vector1= new Vector<Integer>(); Vector<Double> vector2= new Vector<Double>(); System.out.println("== "+ vector1.getClass()==vector2.getClass()); System.out.println("equal "+ vector1.equals(vector2)); where the correct answer put up as true true But when i execute the same program i am getting compile time error as incomparable types: java.lang.String and java.lang.Class <capture of ? extends java.util.Vector> Please clarify about the program output... Thanks.
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
See comment in code: [ December 17, 2006: Message edited by: Barry Gaunt ]
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
Nazeer Ahmed
Greenhorn
Joined: Aug 05, 2006
Posts: 21
|
|
|
oops
|
 |
 |
|
|
subject: whizlab question for SCJP1.5
|
|
|