자바 내부클래스 썸네일형 리스트형 내부클래스 예제1) public class Test1 {public static void main(String[] args) {Demo1 aa=new Demo1(); //객체생성=> 메모리 할당.//Demo1.Ex1 bb=new Demo1.Ex1();Demo1.Ex1 bb=aa.new Ex1();// 내부클래스의 객체생성.bb.write();}} class Demo1{public static int a=10;public int b=20;// 내부 클래스public class Ex1 {public int c;public void write() {System.out.println(a+":"+b+":"+c);}}public void test() {Ex1 oo=new Ex1();oo.write();}public void .. 더보기 이전 1 다음