Core Java - Interview Questions and Answers for 'Access modifiers' | Search Java 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 'Access modifiers' - 4 question(s) found - Order By Newest

 Q1. Name few access and non access Class Modifiers ?
Admin
info@buggybread.com
Ans. private , public and protected are access modifiers.

final and abstract are non access modifiers.

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

   Like         Discuss         Correct / Improve     java   access specifiers   access modifiers   modifiers   access control


 Q2. What is the difference between public class and class ?Core Java
Admin
info@buggybread.com
Ans. Class without any access specifier has the default scope i.e it can be accessed by any class within same package.

Class declared public can be accessed from anywhere.

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

   Like         Discuss         Correct / Improve     java   access specifier   access modifiers   public class   class

Try 1 Question(s) Test


 Q3. What are access and non access modifiers ?Core Java2017-04-26 19:52:14

Ans. Access modifiers are the java reserved keywords that changes the access privileges on a class , method , element etc. For example - public , private and protected.

Non Access modifiers are the java modifiers other than access modifiers. For example - static , final, abstract, synchronized, transient, volatile etc.

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

   Like         Discuss         Correct / Improve     access modifiers     Asked in 2 Companies


 Q4. What is the difference between scope and access modifiers ?Core Java2018-07-09 08:00:46

Ans. Scope modifiers changes the scope of a particular element or a method. For ex - static changes the scope of that of class and not of object.

Access modifiers changes the access priviledges of a particular element or a method. For ex - private , public etc.

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

   Like         Discuss         Correct / Improve     scope modifiers   access modifiers   scope vs access modifiers     Asked in 2 Companies      basic



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: