Life span of variables, JAVA Programming

Assignment Help:

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.


Related Discussions:- Life span of variables

Railway reservation, what java stream is used for designing railway reserva...

what java stream is used for designing railway reservation form?

Gen keys, Write a Java class that generates a random integer (between 1 and...

Write a Java class that generates a random integer (between 1 and 250). Call the class GenKeys. GenKeys should have a least one method that returns the integer random number. Gen K

Explain why java does not support multiple inheritance, Question: (a) ...

Question: (a) Differentiate between the following terms using suitable examples of your own:- (i) inheritance v/s composition (ii) subclass v/s superclass (iii) softwa

What types of new jobs are created because of computing, What types of new ...

What types of new jobs are created because of computing? And that old professions are being eliminated? Because of computing whereas people are getting benefits from automated

Give an example of code using static and finalize, Give an example of code ...

Give an example of code using static and finalize Example Code: using static & finalize () We want to count exact number of objects in memory of a Student class the one de

Defiine the term object, Defiine the term Object ? Object is a named co...

Defiine the term Object ? Object is a named collection of properties (data, state) & techniques (instructions, behavior). Mainly Objects are key to understanding object-oriente

The software or script to scan automotive ads, The software or script to sc...

The software or script to scan automotive ads Project Description: Looking for a company that made the script or application to search through pages of listings of automotive

What is the point-to-point model in jms, A point-to-point model is based on...

A point-to-point model is based on the concept of a message queue: Senders send messages into the queue, and the receiver reads messages from this queue. In the point-to-point mode

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd