Select the correct answerWhich of these access specifiers can be used for an interface?OptionsProtectedPublicprivateAll of these
Question
Select the correct answerWhich of these access specifiers can be used for an interface?OptionsProtectedPublicprivateAll of these
Solution
The correct answer is Public. In Java, interface methods are implicitly public and abstract. You cannot use private or protected with interface methods in Java.
Similar Questions
Select the correct answerFrom the options given below, Choose the access specifier can be used for an interfaceOptionsprivateProtectedPublicAll of the mentioned
Select the correct answerWhich of these access specifiers must be used for main() method?Optionsprivatepublicprotectednone of the mentioned
t the correct answerWhich of the following access specifiers can be used for an interface?
ct the correct answerWhich 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?OptionsPublicPrivateProtectedNo Modifier
A top-level class may have which one of the following access modifiers?Optionsprivatepackageprotectedpublic
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.