상속-2(다형성과 오버라이딩, 캡슐화,super)
class human{void showInfo() {System.out.println("All human beings are equal.");}}class Asian extends human{}public class Appilcation { public static void main(String[] args) {// TODO Auto-generated method stubAsian test = new Asian(); 객체를 생성함test.showInfo(); human클래스의 showInfo메소드 호출}}실행결과 "All human beings are equal. 출력 오버라이딩은 부모 클래스(human) showInfo메소드를 물려받은 자식 Asian 클래스에서반환타입, 메소드이름, 인수와 똑같은 기능..