#1  
16th February 2012, 12:42 PM
kimidi
 
Join Date: Feb 2012
Posts: 1

Difference between Instance Variables and Local Variables?


what is the difference between instance variables and local variables




  #2  
26th April 2012, 03:33 AM
anubhav0007
Senior Member
 
Join Date: Jan 2011
Location: New Delhi
Posts: 166
Default Re: Difference between Instance Variables and Local Variables?

Difference Between Instance Variables and Local Variables--

Local variables-
- Local variables declared inside the function.
- Their scope is limited to the function.
- They can be only accessed inside the function.
- They are deleted at the end of method.
- Local variables are called stack variables because they are saved in the stack.

Instance variables-
- All the variables created in the class and not inside a function.
- Their scope is of the class instance and they are saved in the heap.
Do you have any question? or have anything to say?



Related Topics:

Thread Replies Last Post
Is it possible to appear for MP PMT as a local candidate after completing 12th from MP? Percentage of seats for Non Local candidates? 2 30th November 2017 08:58 PM
Will I be considered as local or non local student after studying secondary in AP and Maharashtra partially? 8 5th June 2017 09:49 PM



Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
vBulletin Optimisation by vB Optimise.
Please also check: