File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error initializing hashmap

 
leroy tsruya
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
i keep getting errors for this line:

it says that it doesnt find Classes T and S

but these are wildcards...

Thanks!
 
Henry Wong
author
Marshal
Pie
Posts: 20835
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wildcards are specified with a "?" question mark. You can also bound it with "extends" and "super", but even then, you need to specify with a "?".

Henry
 
Shashank Rudra
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is not how we create generic while declaring reference variables. That is when we are defining generics for classes and methods. For defining reference variables Generic in nature instead we use <?>, <? extends> and <? super>. That depends on what is our need. Those details can be found in Core java books. I would prefer to look into Kathie's book.
 
leroy tsruya
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys, i figured my mistake.
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic