1.

Which of the following access specifiers can be used for an interface?(a) Protected(b) Private(c) Public(d) Public, protected, privateThe question was asked in exam.Question is from Interfaces in section Interfaces & Packages of Java

Answer»

The correct option is (a) Protected

To explain: Interface can have EITHER public ACCESS SPECIFIER or no specifier. The REASON is they NEED to be implemented by other classes.



Discussion

No Comment Found

Related InterviewSolutions