Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


JEEVAN
Referance variable
1 Answer(s)      6 years and 10 months ago
Posted in : Java Interview Questions


by using which reference variable we declare instance variable as local variable in java


Advertisement
View Answers

April 12, 2008 at 7:22 PM


Hi friend,

Local variables are declared in a method, constructor, or block. When a method is entered, an area is pushed onto the call stack. This area contains slots for each local variable and parameter. When the method is called, the parameter slots are initialized to the parameter values.

Instance variables are declared in a class, but outside a method. They are also called member or field variables. When an object is allocated in the heap, there is a slot in it for each instance variable value. Therefore an instance variable is created when an object is created and destroyed when the object is destroyed.


-------------------------------------------

Read for more information,

http://www.roseindia.net/java/


Related Tutorials/Questions & Answers:
Referance variable - Java Interview Questions
Referance variable  by using which reference variable we declare instance variable as local variable in java   Hi friend,Local variables... variable and parameter. When the method is called, the parameter slots are initialized
Local Variable and Instant Variable
Local Variable and Instant Variable  difference between Local Variable and Instant Variable   Difference between local variable and instance variable Instance variable is declared within a class but not within
Advertisements
Java variable
Java variable   To what value is a variable of the String type automatically initialized
Pointer a variable
Pointer a variable  hii, Pointer is a variable or not ?   hello, Yes, a pointer is a variable
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
environment variable
environment variable  what are the environment variable is need to run j2ee application in eclipse could you explain the details
final variable
final variable  Please give some easiest and understanding example program for final variable
environment variable
environment variable  what is environment variable in java?   Environment variables are used by the Operating System to pass configuration information to applications
Static Variable
Static Variable  What is the basic use of introducing static variable... that a certain object/variable is resident in memory and accessed each time an instance..., it means that the static variable is shared among all instances of the class
Application Variable
anyone show a simple sample code of storing the connection data in a variable so
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
global variable in objective c
global variable in objective c  Declaring global variable in objective c
define string variable in php
define string variable in php  how to define string variable in PHP
static variable in php
static variable in php  How can i call a global variable as a static variable
php variable functions
php variable functions  Setting a variable in a class function, where can I use that variable
Flex Variable Scope
Scope of the variable defines the accessibility of the variable across the application. The global variable has global access to the application and local variable is restricted to the block of code only. The variable defined outside
how to inherit static variable
how to inherit static variable   how to inherit static variable or methods in Java?? Please explain the entire process of inheriting the variable. Thanks in advance
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP?   Go through the PHP Variable function tutorial ... PHP Variable Function
php search variable
php search variable  Search variable in PHP
What is use of a abstract variable?
What is use of a abstract variable?   Hi, What is use of a abstract variable? thanks
variable declaration in c and c++
variable declaration in c and c++  Comparison and an example of variable declaration in C and C
STATIC VARIABLE DECLARATION
STATIC VARIABLE DECLARATION  why cannot the static variable declare inside the method
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP
variable types in php - PHP
variable types in php  Do i need to explicitly specify the variable type in PHP
php variable scope
php variable scope  How can i access a variable from scope of another function
php variable in javascript
php variable in javascript  Access php variables in Javascipt or Jquery rather than php echo $variable
What is the importance of static variable?
What is the importance of static variable?  hi, What is the importance of static variable? thanks
What is use of a abstract variable?
What is use of a abstract variable?   Hi, What is use of a abstract variable? thanks
Serialize the static variable
Serialize the static variable  hello, Can we serialize the static variable?   hii Yes we can serialize the static variable. if u don't want to serialize, u need to declare the variable as transient
php define variable
php define variable  How to define a simple and a global variable in PHP
 

 

 

DMCA.com