हिंदी

What is the scope of a local variable in Java?

Advertisements

प्रश्न

What is the scope of a local variable in Java?

लघु उत्तरीय
Advertisements

उत्तर

The scope of a local variable in Java is limited to the method, constructor, or block in which it is declared. It can be accessed and used only within that particular region of the program and cannot be accessed outside its scope.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - SHORT ASSIGNMENTS [पृष्ठ १३६]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 6 Variables and Expressions
SHORT ASSIGNMENTS | Q 31. | पृष्ठ १३६
Advertisements
Share
Notifications



      Forgot password?
Use app×