Computer Science, asked by rony873, 10 months ago

what is scope and lifetime of a local and global variable in java ​

Answers

Answered by rarpita600
0

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.

Similar questions