Which of these access specifiers can be used for an interface?OptionsPublicprivateAll of theseProtected
Question
Which of these access specifiers can be used for an interface?OptionsPublicprivateAll of theseProtected
Solution
In Java, the access specifier for an interface can only be public or default (no specifier). The options private and protected cannot be used for an interface. So, the correct answer is "Public".
Similar Questions
Select the correct answerWhich of the following access specifiers can be used for an interface?OptionsPrivateProtectedPublicPublic, protected, private
t answerFrom the options given below, Choose the access specifier can be used for an interfaceOptionsPublicprivateProtectedAll of the mentioned
Which of these access specifiers can be used for a class so that its members can be accessed by a different class in the different package?OptionsProtectedPublicPrivateNo Modifier
A top-level class may have which one of the following access modifiers?Optionsprivatepackageprotectedpublic
t the correct answerWhich of the following access specifiers can be used for an interface?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.