Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

What is instance variable in Java?

Ads

 
 

Share on Google+Share on Google+

Java Coder
What is instance variable in Java?
1 Answer(s)      2 months and 8 days ago
Posted in : Java Beginners

Hi,

What is instance variable in Java?

What is the use of instance variable?

Thanks

Ads
View Answers

April 16, 2017 at 10:48 PM


Hi,

In Java programming classes are used as base of Object oriented programming. Any variable which is defined in a class is know as instance variable. This is also know as a member variable.

If you create 10 instance of the class then each instance will have their own separate copy of data.

Check example at Example of a instance variable.

Thanks


Ads