11. What keyword is used to declare a method that can be called without creating an instance of the class? A. static B. final C. public D. this Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
12. Which of the following access modifiers restricts a method or variable's access to the same package only? A. public B. protected C. private D. package-private Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
13. In Java, what is the purpose of the static keyword when applied to a variable? A. It makes the variable non-static. B. It initializes the variable. C. It allows access from any class. D. It makes the variable constant. Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
14. Which keyword is used to define a superclass's method that is overridden by a subclass method? A. override B. extends C. super D. implement Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
15. What is the access level of a class member declared as private in Java? A. public B. protected C. private D. package-private Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
16. Which access modifier allows a class member to be accessed within the same package and its subclasses? A. private B. public C. protected D. package-private Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
17. What is the keyword used to declare a class that cannot be instantiated and can only be extended? A. final B. const C. static D. abstract Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
18. In Java, what access modifier is used to specify that a class member can be accessed only within its class? A. protected B. private C. public D. package-private Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
19. Which of the following is not an access modifier in Java? A. abstract B. final C. transient D. static Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
20. What access modifier allows a class member to be accessed from any class in the same package or any subclass? A. protected B. private C. public D. default Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board