Use getClass(). getSimpleName() to Check the Type of a Variable in Java. We can check the type of a variable in Java by calling getClass(). getSimpleName() method via the variable.
Use getClass(). getSimpleName() to Check the Type of a Variable in Java. We can check the type of a variable in Java by calling getClass(). getSimpleName() method via the variable.