recategorized by
4,308 views

1 Answer

0 votes
0 votes

Answer must be C public

because

  • An interface is a reference type in Java, it is similar to class, it is a collection of abstract methods. A class implements an interface, thereby inheriting the abstract methods of the interface.
  • Interfaces are meant to define the public API of a type - and only that, not its implementation.
  • An interface is implicitly abstract. You do not need to use the abstract keyword while declaring an interface.
  • Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.
  • So any method (or static member) you define in an interface is by definition public.
Answer:

Related questions

3 votes
3 votes
2 answers
1
go_editor asked Aug 1, 2016
3,733 views
Which one of the following is correct?Java applets cannot be written in any programming languageAn applet is not a small programAn applet can be run on its ownApplets are...
2 votes
2 votes
1 answer
2
go_editor asked Aug 1, 2016
2,049 views
The Servlet Response interface enables a servlet to formulate a response for a client using the methodvoid log(Exception e, String s)void destroy()int get ServerPort()voi...