JAVA > Programming Basic

Set 2 - OOP Concept

--:--
Question 1 of 15

Which of the following is NOT one of the four main pillars of Object-Oriented Programming (OOP) in Java?

Question 2 of 15

Which OOP concept wraps data (variables) and code (methods) together into a single unit and restricts direct access?

Question 3 of 15

Which keyword is used in Java to inherit properties and methods from a superclass?

Question 4 of 15

What is it called when a class defines multiple methods with the same name but different parameter lists?

Question 5 of 15

Which OOP principle allows a subclass to provide a specific implementation of a method already defined in its parent class?

Question 6 of 15

Which keyword is used inside a subclass to refer directly to its immediate parent class object or constructor?

Question 7 of 15

Which keyword is used by a Java class to inherit an interface?

Question 8 of 15

Can you create an object directly from an abstract class using the 'new' keyword in Java?

Question 9 of 15

Which access modifier restricts the visibility of a class member strictly within the same class?

Question 10 of 15

What is the primary purpose of a constructor in Java?

Question 11 of 15

Which type of inheritance is NOT directly supported through classes in Java to avoid the Diamond Problem?

Question 12 of 15

Which keyword refers to the current object instance inside a method or constructor?

Question 13 of 15

What type of polymorphism is achieved through Method Overriding in Java?

Question 14 of 15

Which keyword prevents a class from being subclassed (inherited) by any other class?

Question 15 of 15

In Java, which class is the root superclass of all classes by default?

Question Palette 0 / 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

  Answered   Not Answered
  • Privacy Policy