What is a local, member and a class variable?

What is a local, member and a class variable?

Hi,

What is a local, member and a class variable?

thanks,

View Answers

April 16, 2013 at 1:27 PM

Hi friend,

Variables are used to store some values which may be changed. In Java we can declare the variables in different ways and these variables have the limited visibility scope, such as if a variable is declared within a method, constructor, and a block then it is called local variables, variables declared with static keyword inside a class but outside the method then it is called class variable. Here you have asked about member variables so, let you know that the instance variables and class variables are called member variables. A member variables belongs to a particular instance of class i.e. object. These variables are initialized just before the constructor is called.

For more detail please go through the following link

http://www.roseindia.net/java/java-tips/data/variables/45local-inst-class.shtml









Related Tutorials/Questions & Answers:
What is a local, member and a class variable?
What are local variables?
Advertisements
What does it mean that a class or member is final?
java memory allocation for member variables and member functions
What are instance variables?
Member Classes
php local variables
How to access sub class member using super class object
What is JavaScript Variables ?
Variables
variables are **called instance variables because they are created** whenever an object of the class is instantiated.
variables and methods declared in abstract class is abstract or not
please tell me the difference between local variable, staitic variables, and instance variables....
What is an Abstract Class and what is it's purpose?
What is Action Class?
What is an abstract class?
What is final class?
What is Calendar class in Java?
Use of Local Inner class
What is nested class in Java with Example?
What is nested class in Java with Example?
What is the Locale class?
what is the size of java class
Member Classes, Inner Nested Classes in java
Difference between the local and class variable.
Java Interview Questions - Page 6
What is inner class in Java? - Java Beginners
what is class methods in objective c
what is class methods in objective c
Access Static Member Of The Class Through Object
what's the purpose of constructor in abstract class?
What is the base class of all classes?
Variables in Java
What are the difference between abstract class and interface?
What are the different types of property and class mappings?
Access Modifiers
If I open .class file with notepad what is displayed?
What happens to the static fields of a class during serialization?
what is the working of JVM when An object is created of a class?
JavaScript Variables
Class in Java
please tell me what is ment by wrapper class in java........
PHP Mutator Accessor
What’s the difference between accessing a class method via -> and via ::?
What is the difference between a static and a non-static inner class?
What's the proper way to test a class with private methods using JUnit?
ModuleNotFoundError: No module named 'member'
ModuleNotFoundError: No module named 'member'
Class and Instance
call to a member function

Ads