Types of variables in Java programming

What are the types of variables in Java ?

Ans. The types of variables in Java are-
  1. Instance variable
  2. Static variable
  3. Local variable

class EEN{  
int age=20;//instance variable  
static int a=30;//static variable  
void show(){  
int b=40;//local variable  
}  
}

Share:

Post a Comment

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.