접근지정자
-
단일상속 extends Object & 접근지정자 protected & super,this개발노하우/Java 2007. 5. 7. 11:52
import java.lang.*; // 생략된 형태 class AA extends Object{ int x = 100; } class BB extends AA{ int y = 200; } class CC extends BB{ int z = 300; } public class object extends Object{ public static void main(String arg[]){ CC cp = new CC(); System.out.println("z ="+cp.z); System.out.println("y ="+cp.y); System.out.println("x ="+cp.x); } } ===============================================================..