형변환
-
Java - Promotion, Casting 묵시적, 명시적 형변환Java 2018. 1. 18. 11:04
package chapter05.exam06.promotion;/* vertebrate / \ / \ Birds Mamal / \ / \Chicken Duck Dog Cat*/ class Vertebrate{} // 척추 동물 class Birds extends Vertebrate{} // 조류class Chicken extends Birds{} // 닭class Duck extends Birds{} // 오리 class Mamal extends Vertebrate{} // 포유류class Dog extends Mamal {} // 개class Cat extends Mamal {} // 고양이 public class Promotion { static Vertebrate Verte; public stati..