Question discussion

Which of the following is a correct interface?

291562Medium 1 reply 739 views
-1
Which of the following is a correct interface?
  • Ainterface A { void print() { } }
  • Babstract interface A { print(); }
  • Cabstract interface A { abstract void print(); { }}
  • Dinterface A { void print(); }
Correct answer: D

Discussion 1

0
CCommunity
interface A { void print(); }