19 lines
242 B
Java
Executable File
19 lines
242 B
Java
Executable File
public class Access{
|
|
|
|
public String nonStaticMember="abc";
|
|
|
|
public nonStaticMethod() {
|
|
return "def";
|
|
}
|
|
|
|
}
|
|
|
|
class TestNonStaticAccess {
|
|
|
|
public method1(a,b) {
|
|
x;
|
|
x = new Access();
|
|
a=x.nonStaticMember;
|
|
b=x.nonStaticMethod();
|
|
}
|
|
} |