• Post Reply Bookmark Topic Watch Topic
  • New Topic

Map<String, Int> keyset not working  RSS feed

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Since the keys are Strings, what is the problem? How do I fix this?

Thanks,
John Price
 
Paul Clapham
Sheriff
Posts: 22828
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
john price wrote:Since the keys are Strings, what is the problem? How do I fix this?


What the keys are has nothing to do with that error message, which simply says that you've tried to use a method which doesn't exist. You fix it by changing "keyset" to the name of a method which does exist. Check the API documentation for java.util.Map to find one.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66306
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hint: it has nothing to do with types.

{Bah! Beat by 30 seconds!}
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stupid me! Thank you!

For anyone who is wondering, it is keySet

John Price
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!