19 lines
242 B
Plaintext
19 lines
242 B
Plaintext
|
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();
|
||
|
}
|
||
|
}
|