자바 프로그래밍 언어에서 Class 들이 구현해야하는 동작을 지정하는데 사용되는 추상 자료형
[visibility] interface InterfaceName [extends other interfaces] {
constant declarations
abstract method declarations
}
ex) public interface Interface1 extends Interface2;
public class Lion implements Predator {
@Overide
public boolean chasePrey(prey p) {
}
@Overide
public void eatPrey(prey p) {
}
}
public interface VenomousPredator extends Predator, Venomous {
//interface body
}
** 인터페이스 부분은 처음 접하는 개념이라 시간이 될 때, 더 자세하게 다루도록 하겠다.
대박