Answers for "java type of variable"

3

get type of variable java

((Object) myVar).getClass().getName()
//OR
((Object) myInt).getClass().getSimpleName()
Posted by: Guest on September-20-2020
3

type variable java

public class A  
{  
    static int m=100;//static variable  
    void method()  
    {    
        int n=90;//local variable    
    }  
    public static void main(String args[])  
    {  
        int data=50;//instance variable    
    }  
}//end of class
Posted by: Guest on July-16-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language