By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,789 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,789 IT Pros & Developers. It's quick & easy.

insert integer as keys in hashtable

P: 20
can anyone help me?/

i want to insert keys of integer type to a hashtable. i can insert keys of string type in the hashtable. But integer keys not getting inserted.

i am getting exception as

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

thank u..
Apr 26 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.