Outer
-
Java - Outer & Inner & 객체공유개발노하우/Java 2007. 4. 18. 12:59
class Outer{ public Outer(){} private int x = 100; // private 써보기 private static int y = 200; public void setx(int x) { this.x = x; } public void disp(){ System.out.println("x="+x); System.out.println("y="+y); } class Inner{ public Inner(){} public void disp_in(){ System.out.println("x="+x); } } } public class ex_01 { public static void main(String[] arg) { // ot Outer ot = new Outer(); ot.setx(..