Q) If you want to write multiple functions in a class with same name, then what Java feature will you use?
- Function overriding
- Encapsulation
- Function overloading
- None
Answer: 3
Q) Polymorphism types in Java is/are
- Compile time
- Run time
- Both
- None
Answer: 3
Q) If I want to have common functions in a class and want to defer implementations of some other functions to derived classes, then we need to use
- An interface
- An abstract class
- A static class
- None
Answer: 2
Q) Loose coupling in java programs can be done by
- Using interface
- Encapsulating an object of another class
- Both
- None
Answer: 1