Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these access specifiers can be used for an interface?
  2. A.
    Public
    B.
    Protected
    C.
    private
    D.
    All of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Access specifier of interface is either public or no specifier. When no access specifier is used then default access specifier is used due to which interface is available only to other members of the package in which it is declared, when declared public it can be used by any code.


Be The First To Comment