추상 메서드와 throws 절의 관계 테스트


throws 절을 갖는 [ 예제 6-34 ]의 Lendable 인터페이스를 throws 절을 갖지 않는 [ 예제 6-25 ]의 SeparateVolume 클래스와 함께 컴파일해 보십시오. 어떤 결과가 나옵니까?




다음과 같은 에러가 발생한다.


error: checkOut(String, String) in SeparateVolume cannot implement checkOut(String, String) in Lendable


+ Recent posts