Which of the following statements about 'instanceof' operator is true?
Q.62Medium
In the context of constructors, which statement is correct?
Q.63Medium
What is the difference between 'this' and 'super' keywords in Java?
Q.64Medium
Which of the following best describes polymorphism in Java?
Q.65Medium
An abstract class in Java cannot be instantiated, but it can have concrete methods. Which statement explains why?
Advertisement
Q.66Medium
Which of the following correctly implements method overloading rules in Java?
Q.67Medium
Which statement about interface implementation in Java is true?
Q.68Medium
Which statement about the 'protected' access modifier is correct?
Q.69Medium
Which of the following is NOT a characteristic of an interface in Java?
Q.70Medium
What will happen if you try to override a final method in a child class?
Q.71Medium
Which statement about 'this' keyword is correct?
Q.72Medium
Consider:
interface I1 { void method(); }
interface I2 { void method(); }
class C implements I1, I2 { public void method() { System.out.println("Method"); } }
What will be the behavior?
Q.73Medium
What is method overloading?
Q.74Medium
Which of the following is true about abstract classes?
Q.75Medium
Consider the code:
abstract class Animal { abstract void sound(); void sleep() { System.out.println("Zzz"); } }
class Dog extends Animal { void sound() { System.out.println("Bark"); } }
What can Dog objects do?
Q.76Medium
Which statement is true about the default access modifier (package-private) in Java?
Q.77Medium
What is the output of the following code?
class Parent { void show() { System.out.println("Parent"); } }
class Child extends Parent { void show() { System.out.println("Child"); } }
public class Test { public static void main(String[] args) { Parent p = new Child(); p.show(); } }
Q.78Medium
Which of the following statements about the 'final' keyword is correct?
Q.79Medium
What is the difference between 'this' and 'super' keywords?
Q.80Medium
Consider a scenario where class B extends class A. If class A has a constructor with parameters, what must class B do?