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
I need help setting up and fleshing out a basic outline/structure for a basic Java web app using an MVC pattern

In an external JavaScript file write code that, upon form submission, scans the list of courses for a match (case should be insensitive). If a match is found, change the div's back

AJAX- HTML- XML- CSS and  Tomcat used in Java: Project Title: Zee Ads   Role                       : Developer Domain                  : Web Ads Environment

What are the kinds of computer network according to the distance among nodes? The kinds of computer network according to the distance among nodes are: 1. LAN 2. WAN

Video course on computer security needed Project Description: We want a video course on computer security. Just like the way lynda provides. Skills required are Computer S

What does it mean that a method or field is "static"? Static variables and methods are instantiated only once per class. In other words they are class variables, not example va

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Texas Hold'em Poker Java Game Source Code Project Description: I am seeking Java source code for a Texas Hold'em Poker game. The game could have client and server side mod

Explain traversing through a collector using Iterator. Ans. We can access each element in Collection by using Iterators regardless of how they are organized in collector. Ite

#question)i) devising ii) validating and iii) testing of algorithms...