This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

whizlab question for SCJP1.5

 
Nazeer Ahmed
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See comment in code:

[ December 17, 2006: Message edited by: Barry Gaunt ]
 
Nazeer Ahmed
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic