Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. There are different types of relationship between classes Inheritance - Also called is-a relationship, Child class object carries the body of the Parent class when initiated. Moreover there are certain privileges attach to method overriding to the classes related this way. This relationship exist for code reuse, method overriding and interfacing ( through abstract class ). Composition - Also called has-a relationship. Class objects carries a reference to other class objects when instantiated. This relationship exist for work flow / work delegation. Inner / Nested class - It’s a relationship that encapsulates the inner class or it’s object within the outer class. This relationship exist for encapsulation / security. | ||||
![]() | ||||
![]() ![]() ![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() or What is the difference between String , StringBuilder and StringBuffer ? | ||||
![]() | ||||
![]() or Explain OOPs Principles or Explain OOPs Concepts or Explain OOPs features or Tell me something about OOPs | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||
![]() | ||||