What is a member variable?
Advertisements
Question
What is a member variable?
Short Answer
Advertisements
Solution
A member variable in Java is a variable declared inside a class but outside any method, constructor, or block. It is used to store data related to the class or its objects. Member variables can be instance variables or static (class) variables, depending on whether they are declared with the static keyword.
shaalaa.com
Is there an error in this question or solution?
