Which of the following correctly implements an interface with a method?
interface Test { void method() {} } class Demo implements Test {}
interface Test { void method(); } class Demo implements Test { public void method() {} }
interface Test { void method(); } class Demo implements Test { void method() {} }
interface Test { void method(); } class Demo extends Test {}
This question is part of this quiz :
Java Interfaces