Check out example codes for "como saber de que tipo es una variable en java". It will help you in understanding the concepts better.

Code Example 1

String myString = "Hola";
    double myDouble = 0;
    Person myPerson = new Person();

    if(myString instanceof String){
        System.out.println("Es de tipo String");
    }else{
        System.out.println("No es de tipo String");
    }

    if((Object)myDouble instanceof Double){
        System.out.println("Es de tipo Double");
    }else{
        System.out.println("No es de tipo Double");
    }

    if(myPerson instanceof Person){
        System.out.println("Es de tipo Person");
    }else{
        System.out.println("No es de tipo Person");
    }

Learn ReactJs, React Native from akashmittal.com