Life span of variables, JAVA Programming

While you declare a variable in a function, the variable can be accessed within that function only.  While you exit the function, the variable is destroyed.  These variables are called as local variables. You can have local variables along the similar name in distinct functions, because each is identified only by the function wherein it is declared.

If you declare any variable outside a function, all of the functions on your page can access it. The lifetime of these variables begins while they are declared, and ends while the page is closed.

Posted Date: 4/20/2013 1:56:49 AM | Location : United States

Related Discussions:- Life span of variables, Assignment Help, Ask Question on Life span of variables, Get Answer, Expert's Help, Life span of variables Discussions

Write discussion on Life span of variables
Your posts are moderated
Related Questions
We need to create an Android application. The application is about registering courses in a university, viewing grades, available courses and evaluating faculty members. Advisor

What do you mean through FTP or File Transfer Protocol? FTP: File transfer protocol was first introduced in the year of 1973; it standardized the transfer of files among comp

how would I become expert in collection framework

I want someone to help me prepare a simple inventory system. I am not a programmer trying to learn as i go. Skills required: Android, Java, iPhone, Mobile Phone, Objective

Logical Operators Operator Functionality E x ample/ Explanation     && Looks at 2 expressions & returns a

The Java programming language is object-oriented and includes automatic garbage collection. Garbage collection is the process of reclaiming memory taken up by unreferenced objects.

What will be the output of this programme? Write comments where you find "//" symbol in the following code? function doSomething() { // 1 setTimeout('doSomething()',10000

write code employe managment

The == gives true, if the variable reference points to the similar types of object in memory. That is a " shallow comparison ".   The equals () - gives the results of run