aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java Programming
  • When we implement interface method it should be declared ...
Multiple choice

When we implement interface method it should be declared as public.

  1. true

  2. false

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

In Java, all methods defined in an interface are implicitly public. When a class implements an interface, the implementation must also be declared as public.

Keep practicing — related questions

  • All interface methods must be declared as public when implemented in a class.
  • All interface methods must be declared as public when implemented in a class.
  • All interface methods must be declared as public when implemented in a class.
  • In this Interface,print method is public even though there is no public keyword.Is this true or false?
  • Methods, which are declared in interface are by default___________
  • Interface methods can be declared with which the following modifiers
  • Methods that are declared abstract in the base class must show implementation at the time of declaration.
  • An Interface can only have public members whereas an abstract class can contain private as well as protecte...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy