Which of the following statements about inheritance in Java is correct?
Q.122Easy
What is the primary purpose of using the 'super' keyword in Java?
Q.123Medium
Which of the following correctly describes method overriding in Java?
Q.124Easy
In Java OOP, which principle ensures that internal details of a class are hidden from the outside world?
Q.125Medium
Which of the following statements about 'instanceof' operator is true?
Advertisement
Q.126Medium
In the context of constructors, which statement is correct?
Q.127Medium
What is the difference between 'this' and 'super' keywords in Java?
Q.128Medium
Which of the following best describes polymorphism in Java?
Q.129Medium
An abstract class in Java cannot be instantiated, but it can have concrete methods. Which statement explains why?
Q.130Medium
Which of the following correctly implements method overloading rules in Java?
Q.131Hard
In Java, if a child class constructor does not explicitly call the parent class constructor using 'super()', what happens?
Q.132Medium
Which statement about interface implementation in Java is true?
Q.133Hard
A developer needs to create a class that cannot be extended and whose instances are immutable. Which keywords should be used?
Q.134Easy
Which of the following correctly describes the relationship between a class and an interface?
Q.135Hard
When a static method is called on an instance of a class, what happens?
Q.136Hard
A company's codebase has a scenario where multiple unrelated classes need to implement a contract with specific methods. Which design choice is best?
Q.137Medium
Which statement about the 'protected' access modifier is correct?
Q.138Easy
What will be the output of the following code?
class Parent { void display() { System.out.println("Parent"); } }
class Child extends Parent { void display() { System.out.println("Child"); } }
public class Test { public static void main(String[] args) { Parent p = new Child(); p.display(); } }
Q.139Medium
Which of the following is NOT a characteristic of an interface in Java?
Q.140Easy
What is the primary purpose of the 'super' keyword in Java?