Skip to content
Advertisement

Tag: primitive-types

Check if input is of Primitive type in Java?

I have to check for each input and print out if it is an instance of a primitive or referenced type. But I am getting same output each time. Note: I do search SO, but no luck. How can I check if an input is a integer or String, etc.. in JAVA? Code: } Output: Answer Before I address your

Advertisement