Core Java - Interview Questions and Answers for 'Protected' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Core Java - Interview Questions and Answers for 'Protected' - 3 question(s) found - Order By Newest

Very Frequently asked across all type of companies and across all levels.
  Q1. Difference between Public, Private, Default and Protected ?Core Java
Ans. Private - Not accessible outside object scope.

Public - Accessible from anywhere.

Default - Accessible from anywhere within same package.

Protected - Accessible from object and the sub class objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oop   access specifier   public   private   default   protected   public vs private vs default vs protected     Asked in 12 Companies      basic        frequent

Try 1 Question(s) Test


Related Questions

  Which access specifiers can be used with top level class ? a. public or default b. public or private c. public or protected d. protected or default
  Can we instantiate the object of derived class if parent constructor is protected ?
  Which of the following keyword is not permitted for outer class ?
 Can a class be declared "protected" ?


 Q2. Can we instantiate the object of derived class if parent constructor is protected ?Core Java
Ans. Yes, as protected constructor is accessible in sub class.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   constructor   access specifier   protected   yes-no  private constructor


Related Questions

 Have you ever felt the need of keeping the constructor private ?
 Can a constructor have a private access specifier ?
  Can we instantiate the object of derived class if parent constructor is private ?


 Q3. Can a class be declared "protected" ?Core Java
Ans. No, only methods can be declared protected.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     protected  modifiers


Related Questions

  Difference between Public, Private, Default and Protected ?
  Which access specifiers can be used with top level class ? a. public or default b. public or private c. public or protected d. protected or default
  Can we instantiate the object of derived class if parent constructor is protected ?
  Which of the following keyword is not permitted for outer class ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: