I have an object and I want to detect what type is, so I can call
if (obj isa Integer)
put(key,integerval);
if (obj isa String)
put(key,stringval);
if (obj isa Boolean)
put(key,booleanval);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re pretty close, actually!
From the JLS 15.20.2:
Looking at your usage pattern, though, it looks like you may have bigger issues than this.