What are the main features of Java? - Answers 1. Object-oriented
2. Simple
3. Platform Independent
4. Secured
5. Robust
6. Portable
7. Multithreaded
8. Distributed
What are the fundamental principles of OOP? - Answers 1. Inheritance
2. Abstraction
3. Polymorphism
4. Encapsulation
What is Inheritance in Java? - Answers Inheritance is one of the key principles of OOP. Through
Inheritance, one class can inherit the properties of another class. The class from which properties are
inherited is called a "super" class and the class to which properties are inherited is called a sub class.
What is Constructor Overloading and its use? - Answers A class can have any number of constructors.
These constructors will have different lists of arguments. It is called constructor overloading.
Constructor overloading provides different ways to instantiate a class.
What is polymorphism in Java? - Answers Polymorphism refers to any entity whether it is a method,
constructor or an operator which takes many forms or can be used for multiple tasks.
What is method overloading in Java? - Answers When a class has more than one method with the same
name but with different lists of arguments.
What is method overriding? - Answers When a super class method is modified in the sub class then it is
called method overriding.
Does Java support multiple inheritance? - Answers Java supports multiple inheritance only through
interfaces. That means a class can implement more than one interface but can not extend more than
one class.