check type of variable java

91

check type of variable java -

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

    }
}

Comments

Submit
0 Comments