Which of the following is a correct interface?

Which of the following is a correct interface?


A. interface A { void print() { }; }
B. abstract interface A { print(); }
C. abstract interface A { abstract void print() { };}
D. interface A { void print();}

The correct answer is D


Java

Learn More Multiple Choice Question :