Variables

 Local variable.

Variables declared inside a scope are not visible (that is, accessible) to code that is defined outside that scope. Thus, when you declare a variable within a scope, you are localizing that variable and protecting it

from unauthorized access and/or modification. A variable declared within a block is called a local variable.

Objects declared in the outer scope will be visible to code within the inner scope. However, the reverse is not true.

Комментарии

Популярные сообщения из этого блога

Interview questions

Lesson1: JDK, JVM, JRE

Lesson_2: Operations in Java