aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes whizlab question for SCJP1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "whizlab question for SCJP1.5" Watch "whizlab question for SCJP1.5" New topic
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
 
wood burning stoves
 
subject: whizlab question for SCJP1.5