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.
|Interview Questions and Answers|
|Ans. You can implement encapsulation in Java by keeping the fields (class variables) private and providing public getter and setter methods to each of them. Java Beans are examples of fully encapsulated classes. Encapsulation in Java: Restricts direct access to data members (fields) of a class.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  oops  oops example  oops concepts  oops features Asked in 2 Companies basic   frequent|
| Explain OOPs |
Explain OOPs Principles
Explain OOPs Concepts
Explain OOPs features
Tell me something about OOPs
|Can you give a real world example of Encapsulation and Abstraction ?|
| Which of the following Java feature promotes access protection or Hiding ?|
|Define encapsulation in Java ?|
|Which of the OOP's features facilitate dependency injection ?|
|Which of the OOP's feature - encapsulation or abstraction - is more important ?|
|Which of the polymorphism type - static or runtime - is more important ?|
|Which of the OOP's feature is most important ?|