does java have a typeof method code example
Example: java typeof
Object obj = null;
obj = new ArrayList<String>();
System.out.println(obj.getClass());
obj = "dummy";
System.out.println(obj.getClass());
obj = 4;
System.out.println(obj.getClass());