aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java Concepts
  • When a method is declared as public, it can be accessed f...
Multiple choice

When a method is declared as public, it can be accessed from its

  1. class

  2. subclass

  3. package

  4. outside package

  5. all of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

Public method can be accessed from any where.

Keep practicing — related questions

  • When a method is declared as private, it can be accessed from its
  • If a method is declared as protected, where may the method be accessed?
  • For a subclass outside the package, the protected member can be accessed through ?
  • Superclass methods with this level of access cannot be called from subclasses
  • Which of the following types of accesses in Java allows a method to be accessible to all the classes of a p...
  • We would like to make a member of a class visible in all subclasses regardless of what package they are in....
  • A method is declared as protected. What classes can access this method? (Choose two. Each option is a corre...
  • You want subclasses in any package to have access to members of a superclass. Which is the most restrictive...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy