Search Interview Questions
| 3372 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.
|Java - Interview Questions and Answers|
|Ans. Encapsulation facilitate hiding and restricted access and hence more of a security feature. Encapsulation is definitely a great feature as when applications expand criss cross communication between objects / modules could lead to blunders.|
Inheritance facilitates code reuse.
Polymorphism comprise of method overloaded ( which to me is negligible usage ) and method overriding. Method overriding is of great usage as it facilitates concept of interfaces and plugin development.
So it’s Security / Organization vs
Code Reuse / Support for other features like overriding vs
Contracts / Plugin Development facilitating the creation of frameworks / libraries.
Which is more important may vary from application to application , its scale , its use , its sensitivity etc.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  oops  oops features  oops concepts|
|What are the difference between composition and inheritance in Java?|
|What is the difference between Encapsulation and Abstraction?|
|What are points to consider in terms of access modifier when we are overriding any method?|
| Explain OOPs |
Explain OOPs Principles
Explain OOPs Concepts
Explain OOPs features
Tell me something about OOPs
|What is Polymorphism in Java ?|
|Why every object constructor automatically call super() in Object before its own constructors?|
|Difference between Overloading and Overriding ?|
|Can you give a real world example of Encapsulation and Abstraction ?|
|Difference between Composition and Inheritance ?|
|How compiler handles the exceptions in overriding ?|