JAVA/자바 개념

[자바]inner class ( static) 코드 예제

해병1188기 2018. 3. 22. 12:59
728x90
반응형
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public class MemberInner {// 
 
    private int a=10;
    public int b =20;
    protected static int c=30;
 
 static class Member // 
    {
         void disp() {
            //System.out.println(a);
            //System.out.println(b);
            System.out.println(c);
        }
    }
 
 
    public static void main(String[] args) {
MemberInner.Member mu = new MemberInner.Member();// 
        mu.disp();
    }
}
cs

 

 


저의 블로그 봐주셔서 감사합니다

재.미.있.게 보셧다면 아래 하트 ❤(공감) 과 댓글 부탁 드려요 .

다들 코로나 극복 화이팅 

728x90
반응형