본문 바로가기
java&eclipse 코딩 알고리즘/20231215

InheritanceTest

by 몽상크리에이터 2023. 12. 15.

package com.tjoeun.inheritance;

public class InheritanceTest {

 

public static void main(String[] args) {

 

// Parent parent = new Parent();

// System.out.println(parent);

Parent parent2 = new Parent("성춘향", false);

System.out.println(parent2);

System.out.println("=================");

 

Child child = new Child();

System.out.println(child);

Child child2 = new Child("임꺽정", true, 35, "도적넘");

System.out.println(child2);

 

}

 

}

'java&eclipse 코딩 알고리즘 > 20231215' 카테고리의 다른 글

VIPCustomer  (0) 2023.12.15
Customer  (0) 2023.12.15
ClassIncludeTest  (0) 2023.12.15
Parent  (0) 2023.12.15
Child  (0) 2023.12.15