How can I check to make sure my variable is an int, array, double, etc...?
Edit: For example, how can I check that a variable is an array? Is there some function to
public class Demo1 {
Object printType(Object o) { return o; } public static void main(String[] args) { Demo1 d=new Demo1(); Object o1=d.printType('C'); System.out.println(o1.getClass().getSimpleName()); }
}