InterviewSolution
Saved Bookmarks
| 1. |
What is scope and lifetime of a local and global variable in java |
|
Answer» local variable resides WITHIN its method, global variable resides for lifetime of the CLASS, and instance variable LAST for itslifetime. ... The SCOPE ofvariable remains only inside the while LOOP and cannot be accessed outside of the loop. |
|