15-2: JAVA interface

jk·2024년 1월 19일
0

kdt 풀스택

목록 보기
27/127



1. @Override 에 대하여 설명하시오.

  • Annotation to mention the method is overriding now.
  • Compile error happens when the @Override doesnt work well. So it encourages developers build codes safer way.



2. interface 에 대하여 설명해 보시오.

  • Methods in interface doesnt have implementation.
  • Methods in interface should be public abstract.
  • child class implements interface. So the methods in child class are able to override the same name same return type methods in interface.



3. interface 안에 올 수 있는 것은 두가지를 말해 보시오.

  • public abstract methods without body
  • public static final variables



4. abstract 키워드란?

  • abstract methods dont have implementation(method body).
profile
Brave but clumsy

0개의 댓글