Get App on

Play Store

Software Engineering Mcqs

A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction ?

 (A)  Declare the method with the keyword public.

 (B)  Declare the method with the keyword private.

 (C)  Do not declare the method with any accessibility modifiers.

 (D)  Declare the method with the keyword public and privat

Submitted By :Ali Uppal


Share this... Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Whatsapp
Whatsapp

  • IF YOU THINK THAT ABOVE POSTED MCQ IS WRONG.

  • PLEASE COMMENT BELOW WITH CORRECT ANSWER AND ITS DETAIL EXPLANATION.

  • Related Mcqs


    Leave a Reply

    Your email address will not be published. Required fields are marked *