All identifiers in Java, like in C/C++, are lexically (or statically) scoped, which means that the scope of a variable can be decided at compile time, independent of the order of function calls.
The area of the program where a variable is available is its scope. Classes are the unit of organization for Java programming. Each class is a component of a larger whole. The following categories can be used to group Java scope rules. However, outside of methods, we can specify class variables wherever in the class. The scope of member variables within a class is unaffected by the access provided for them.
test public class
Integer a;
private String b;
void method1();
int method2();
char c; /
All variables defined directly inside a class / are member variables;
Learn more about variables here-
https://brainly.com/question/13375207
#SPJ4