I have a HashMap<String,Object>
and stored some data from 3 different types (Integer,String,Long).
How Can I find out what is the type of a value with a specific key?
You can call the getClass
method to find the type of an object:
map.get(key).getClass()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With