1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package pack02;
class MemberInner {
private int a = 10;
public int b =20;
protected static int c = 30;
public void output() {
class Member {
public void disp() {
System.out.println(a);
System.out.println(b);
System.out.println(c);
}
}
Member m = new Member();
m.disp();
}
}
public class InnerClassLocal {
public static void main(String[] args) {
// TODO Auto-generated method stub
MemberInner memberinner = new MemberInner();
MwmberInner.Member member = memberinner.new MemberInner();
MemberInner.Member member = new MemberInner.Member();
//member.disp();
MemberInner memberinner = new MemberInner();
memberinner.output();
}
}
|
cs |
'Programming > [JAVA]' 카테고리의 다른 글
[JAVA] Anonymous Inner Class 익명 내부 클래스 (0) | 2018.03.23 |
---|---|
[JAVA] Static Inner Class 스태틱 내부 클래스 (0) | 2018.03.23 |
[JAVA] MemberInnerClass 멤버 내부 클래스 (0) | 2018.03.23 |
[JAVA] ArithmeticsException (0) | 2018.03.23 |
[JAVA] instance of에 대하여 (0) | 2018.03.23 |