Q) Java object oriented programming concepts is/are
- All of the above.
Q) Java does not support _______________?
- Multiple inheritance for classes
- multiple inheritance of interfaces
- compile time polymorphism
Java does not support multiple inheritance for classes but in java multiple inheritance behavior is implemented using interfaces.
Q) Runtime polymorphism feature in java is
- method overriding
- method overloading
- constructor overloading
- operator overloading
Since in method overriding both the classes(base class and child class) have same method, compile doesn’t figure out which method to call at compile-time. In this case JVM(java virtual machine) decides which method to call at runtime that’s why it is known as runtime or dynamic polymorphism.
Q) Encapsulation concept in java is
- Hiding complexity
- method hiding
- Hiding constructor
Q) Following concept can be used for encapsulation in java programs
- Wrapping data fields with methods
- Hiding data and internal methods using access modifiers in a class
- Using Interfaces
- All of the above
Encapsulation means, hiding the complexities in java programs. All options above are used to implement encapsulation in java object oriented programming.