Answers for "how to print type of variable in java"

1

java print variable type

System.out.println(((Object)x).getClass().getName());
Posted by: Guest on September-20-2021
3

get type of variable java

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

Code answers related to "how to print type of variable in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language