Answers for "java how to check the type"

5

java check data type

a.getClass().getName()
Posted by: Guest on June-03-2021
0

check type of variable java

public class MyClass {
    public static void main(String args[]) {
        int x = 5;
        System.out.println(((Object)x).getClass().getSimpleName());

    }
}
Posted by: Guest on December-08-2021

Code answers related to "java how to check the type"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language