What are local variables?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What are local variables?

Rating:

Variables declared within blocks (i.e., inside braces) are known as local variables. They are so called because they are not available for use outside the block where they are declared. These variables are temporary variables, which are visible to the program only within the scope of the block. When the program control leaves a block, all the variables in the block cease to exist.

For the same reason, variables declared inside a method are also known as local variables. The scope defined by a method begins with the block that follows the method declaration. If the method has parameters, they too are included within the scope of the method.


Rating:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.