Answers for "to check type in java"

3

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 "to check type in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language