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
|
package pack02;
class MemberInner {
private int a = 10;
public int b =20;
protected static int c = 30;
class Member {
public void disp() {
//System.out.println(a);
//System.out.println(b);
System.out.println(c);
}
}
}
public class InnerClassMember {
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().new Member();
//member.disp();
}
}
|
cs |
'Programming > [JAVA]' 카테고리의 다른 글
[JAVA] Static Inner Class 스태틱 내부 클래스 (0) | 2018.03.23 |
---|---|
[JAVA] LocalInnerClass 로컬 내부 클래스 (0) | 2018.03.23 |
[JAVA] ArithmeticsException (0) | 2018.03.23 |
[JAVA] instance of에 대하여 (0) | 2018.03.23 |
[JAVA, 자바]Stack, Queue Memory & DynamicBinding영역 (스택, 큐 메모리 & 동적바인딩) (0) | 2018.03.21 |