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