Question 1: JAVA OOPS - Default Constructor
What does Java provide if no constructor is defined in a class?
Question 2: JAVA OOPS - Constructor Overloading
What will be printed?
Question 3: JAVA OOPS - Hierarchical Inheritance
Which is true about hierarchical inheritance?
Question 4: JAVA OOPS - Runtime Polymorphism
What will be printed?
Question 5: JAVA OOPS - Abstract Class Constructor
Which statement is true about constructors in abstract classes?
Question 6: JAVA OOPS - Access Modifier Importance
Why are private access modifiers important in encapsulation?
Question 7: JAVA OOPS - Multiple Interface Implementation
Which of the following is correct?
Question 8: JAVA OOPS - Creating a Package
Which of the following correctly creates a package?
Question 9: JAVA OOPS - Final Method
Which of the following statements about final methods is correct?
Question 10: JAVA OOPS - Overriding Basics
Which statement about method overriding is true?
Question 11: JAVA OOPS - Object Reference Assignment
What will be printed?
Question 12: JAVA OOPS - Constructor Without `void`
Which is true about constructors?
Question 13: JAVA OOPS - Method Overriding in Inheritance
What will be printed?
Question 14: JAVA OOPS - Polymorphism with Parameters
Which of the following is true about polymorphism in Java?
Question 15: JAVA OOPS - Multiple Abstract Classes
Which statement is correct?
Question 16: JAVA OOPS - Read-only Property
How can you make a class property read-only?
Question 17: JAVA OOPS - Default Methods in Interface
Which is true about default methods in Java interfaces?
Question 18: JAVA OOPS - Importing a Package
How do you import the `Test` class from `com.example` package?
Question 19: JAVA OOPS - Final Method Example
What will happen when compiling the following code?
Question 20: JAVA OOPS - Overriding Example
What will be printed?