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 'Infosys chandigarh' - 1 question(s) found - Order By Newest|
|Frequently asked to fresh graduates and less experienced.|
|Ans. Inheritance means a object inheriting reusable properties of the base class. Compositions means that an abject holds other objects. |
In Inheritance there is only one object in memory ( derived object ) whereas in Composition , parent object holds references of all composed objects.
From Design perspective - Inheritance is "is a" relationship among objects whereas Composition is "has a" relationship among objects.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   oops   oops concepts   inheritance  object oriented programming (oops)  oops concepts   composition  object oriented programming (oops)  oops concepts   difference between   basic interview question Asked in 12 Companies basic   frequent|
Try 2 Question(s) Test
|What are the difference between composition and inheritance in Java?|
|What are points to consider in terms of access modifier when we are overriding any method?|
|What is the difference between Encapsulation and Abstraction?|
| 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?|
|Can you give a real world example of Encapsulation and Abstraction ?|
|Difference between Overloading and Overriding ?|
|How compiler handles the exceptions in overriding ?|