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.
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.