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. Only 1

  2. Only 1 and 3

  3. Only 1 and 2

  4. 1, 2 and 3

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

OOP provides data security through access specifiers (private, protected, public) and uses classes with constructors/destructors for better memory management. Pointers are not unique to OOP - they're a low-level feature present in procedural languages like C.

Multiple choice
  1. Pine

  2. Tree

  3. Forest

  4. Oops

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

The program prints "Pine".

Multiple choice
  1. Map database

  2. Weather station

  3. Weather data

  4. None of these

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

This is a package of software-controlled instruments, which collects data that performs some data processing and transmits this data for further processing.