[?]Polymorphism


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :ÀÌ¿¬È£ 1998³â 3¿ù 03ÀÏ 19:21:50

¾Æ·¡ÀÇ Äڵ尡 PolymorphismÀ» ¼³¸íÇÏ´ÂÁö ºÁ ÁÖ¼¼¿ä.
¾Æ·¡ÀÇ Äڵ尡 ¼³¸íÇÏ·Á´Â °ÍÀº ¹¹ÁÒ?
±×¸®°í PolymorphismÀº ¿Ö/¾ðÁ¦ ÇÊ¿äÇÏÁÒ?
´©°¡ ÀÚ¼¼È÷ ¼³¸íÇØÁֽǺР¾ø³ª¿ä????


class Parent {
String name = "Parent";


public void thisFunction() {
System.out.println( this.name );
}
}


class Child extends Parent {
String name = "Child";


public void thisFunction() {
System.out.println( this.name );
}


}


class SuperThis {
public static void main( String args[] ) {
Parent polymorphism = new Child();
polymorphism.thisFunction();


polymorphism = new Parent();
polymorphism.thisFunction();


}
}





´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]