Computer Knowledge

Object-Oriented Programming

2,686 Questions

Object-oriented programming questions test core computer science concepts like classes, inheritance, polymorphism, and encapsulation. The focus includes Java program structures, method overloading, and memory allocation for objects. This topic is essential for technical sections in various recruitment tests.

Java class definitionsMethod overriding rulesPolymorphism conceptsGeneric type parametersMemory allocation in objects

Object-Oriented Programming Questions

Multiple choice
  1. entities

  2. objects

  3. classes

  4. none

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In layered architecture, the active elements in each layer are formally called entities. These entities perform the functions of that layer and provide services to the layer above.

Multiple choice
  1. Inheritance Data Unit

  2. Interface Data Unit

  3. Integrated Data Unit

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice
  1. predefined

  2. post defined

  3. abstract

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Primitive data types (like int, float, char) are predefined by the programming language and represent the most basic building blocks for data manipulation.

Multiple choice
  1. set of values

  2. built-in data type

  3. polymorphic

  4. abstract data type

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Pre-defined data types, such as int, float, or char, are provided by the programming language and are known as built-in or primitive data types.

Multiple choice
  1. redefining

  2. redirecting

  3. reusable

  4. none of above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Objects are designed to be reusable software components, allowing the same logic or structure to be used in different parts of an application.

Multiple choice
  1. basic

  2. primary

  3. derived

  4. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In C, data types are categorized as basic (int, char, etc.), derived (arrays, pointers, structures, unions), and user-defined. Unions are derived types.