Answers for "java var types"

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
1

java variables

/*
##	Variable
- Container which holds the value while the Java program is executed. 
- Assigned with a data type. 
- Name of memory location. 

##	There are three types of variables in java: 
1) Local variable 
2) Static (or class) variable 
3) Instance variable
*/
Posted by: Guest on October-28-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language