Answers for "find data type a class variable in java 8"

3

get type of variable java

((Object) myVar).getClass().getName()
//OR
((Object) myInt).getClass().getSimpleName()
Posted by: Guest on September-20-2020
0

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());
Posted by: Guest on November-08-2020

Code answers related to "find data type a class variable in java 8"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language