Courseiva

1Z0-811 · domain

Object-Oriented Programming

Practise RAM questions covering identification, installation, speeds, dual-channel, and troubleshooting for the 1Z0-811 exam.

58 questions17 easy24 medium17 hard

Focused practice

Practice Object-Oriented Programming questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Object-Oriented Programming

RAM tests your ability to identify, install, and troubleshoot memory types, speeds, and configurations for PCs.

Identifying DDR3 vs DDR4 vs DDR5 physical and electrical differences

Matching RAM speed (MHz) to motherboard and CPU support

Calculating total memory capacity from module size and slots

Troubleshooting common RAM errors like beep codes and blue screens

Why learners struggle

Why Object-Oriented Programming questions are commonly missed

RAM questions are commonly missed because learners confuse physical form factors (DIMM vs SO-DIMM) and fail to distinguish between memory speed (MHz) and latency (CL).

  • ·DIMM vs SO-DIMM — desktop vs laptop form factor confusion
  • ·DDR3 vs DDR4 vs DDR5 — notch position and voltage differences
  • ·MHz vs CL — speed vs latency trade-offs in performance
  • ·Single-channel vs dual-channel — bandwidth impact misconception
  • ·ECC vs non-ECC — error correction support in servers vs desktops
  • ·32-bit vs 64-bit — maximum addressable RAM limit

Watch out for

Common Object-Oriented Programming exam traps

  • Confusing DDR3 and DDR4 notch positions and voltage requirements
  • Assuming dual-channel requires identical size modules only
  • Mixing ECC and non-ECC RAM in a single system
  • Forgetting that 32-bit OS limits usable RAM to 4 GB

Question index

All Object-Oriented Programming questions (58)

Click any question to see the full explanation, or start a practice session above.

1

Refer to the exhibit. What is the likely cause?

Easy
2

A development team is building a library management system. The system has classes 'LibraryItem', 'Book', and 'DVD'. LibraryItem has a method 'getTitle()' that returns the title. Book and DVD extend LibraryItem. The team wants to ensure that when a LibraryItem is borrowed, a message specific to its type is displayed. They have a 'Borrower' class with a method 'borrow(LibraryItem item)', which currently calls 'item.getTitle()' and prints the title. Now they need to display 'Book borrowed' or 'DVD borrowed' based on the actual item type. They want to avoid using 'instanceof' checks in the 'borrow' method to keep it open for new item types. Which design should they use?

Medium
3

Which THREE are fundamental principles of Object-Oriented Programming? (Choose three.)

Easy
4

Refer to the exhibit. What is the output?

Hard
5

A class 'Animal' has a method 'makeSound()'. Subclasses 'Dog' and 'Cat' override it. When calling makeSound() on an Animal reference that actually holds a Dog object, the Dog's version is executed. This is an example of:

Easy
6

A developer wants to achieve loose coupling between components. Which two practices support loose coupling? (Choose two.)

Hard
7

Which THREE are benefits of using inheritance?

Medium
8

A banking application has a base class 'Account' with a method 'withdraw()' marked as final. A subclass 'SavingsAccount' tries to override 'withdraw()'. What is the outcome?

Hard
9

A company's HR system uses an Employee class with sensitive salary information. The team wants to allow other classes to read the salary but not modify it. Which approach best preserves encapsulation?

Medium
10

Which two of the following are fundamental principles of Object-Oriented Programming? (Choose two.)

Easy
11

In a Java application, a class 'OrderProcessor' contains a method that processes orders. The method currently handles multiple responsibilities: validating order data, calculating totals, updating inventory, and sending notifications. The team wants to refactor this method to follow the Single Responsibility Principle. Which action should they take?

Medium
12

Match each Java exception class to its category.

Medium
13

Arrange the steps to implement an interface in a Java class in the correct order.

Medium
14

A junior developer writes a method that attempts to modify a String: public void update() { String s = "Hello"; s.concat(" World"); System.out.println(s); } What will be printed when update() is called?

Easy
15

Which TWO statements are true about the 'super' keyword in Java?

Medium
16

A class that does not define any constructor has:

Easy
17

What is the output of: System.out.println(new Manager("Alice", 5).getName());

Easy
18

Refer to the exhibit. What is the output when the following code is executed? Vehicle v = new Car(); v.accelerate(); System.out.println(v.speed);

Medium
19

Which of the following best demonstrates polymorphism in Java?

Hard
20

Given: abstract class Shape { abstract void draw(); } class Circle extends Shape { void draw() {} } Which is true?

Hard
21

A Java class named 'Helper' is defined in package 'utils'. Another class in a different package tries to access a public method of Helper but receives a compilation error. The Helper class is declared as 'class Helper' (without public modifier). What is the likely issue?

Hard
22

A company is developing a configuration manager that must be shared across all components to ensure consistent settings. The manager should prevent direct instantiation and provide a single access point. Which design pattern and implementation should be used?

Medium
23

Which TWO of the following are valid benefits of using inheritance in Java? (Choose two.)

Medium
24

Consider the following interface: public interface Drawable { void draw(); } A developer implements Drawable in class Circle. Which statement about the implementation is correct?

Hard
25

A logging utility class keeps track of the number of log entries using a static integer variable. The class is instantiated multiple times in the application. How does the count variable behave?

Medium
26

In a banking application, a class 'Account' has a private field 'balance'. Which is the best way to allow subclasses to read but not directly modify 'balance'?

Easy
27

Which THREE statements are true about interfaces in Java? (Choose three.)

Hard
28

A calculator class has two overloaded methods: add(int a, int b) and add(double a, double b). A call to add(3, 4) will invoke which method?

Hard
29

A class has a method that is marked as protected. Which statement is true about its accessibility?

Medium
30

A company develops a payroll system in Java with a hierarchy: Employee, Manager (extends Employee), and Director (extends Manager). Each class overrides a method getDetails() that returns a string with employee information. Employee's getDetails() returns name and ID. Manager's getDetails() adds department. Director's getDetails() adds division. The system uses a single method printDetails(Employee e) that calls e.getDetails(). After a recent deployment, the system prints only the name and ID for all employees, even for managers and directors. The code review reveals that Employee's getDetails() is declared with default (package-private) access, while the overridden versions in Manager and Director are public. The printDetails method and the Manager/Director classes are in different packages. What is the most likely cause and the correct solution?

Easy
31

A developer writes: Object obj = new String("Hello"); System.out.println(obj.length()); What will be the output?

Medium
32

Which TWO access modifiers allow access from a subclass in a different package?

Easy
33

A developer wants to ensure that a class cannot be subclassed. Which keyword should be used?

Easy
34

Refer to the exhibit. What is the output?

Medium
35

A team is designing a system where a 'Report' class can be generated in different formats (PDF, Excel, HTML). They want to avoid modifying the Report class when adding new formats. Which OOP principle or pattern should they use?

Medium
36

Which statement about abstract classes and interfaces is true in Java?

Hard
37

Which THREE are true about Java constructors?

Medium
38

A developer is working on a Java application that processes sensor data. The code uses a class 'SensorDataProcessor' which directly instantiates specific sensor classes like 'TemperatureSensor' and 'PressureSensor' inside its methods. The team wants to make the system extensible to support new sensor types without modifying the processor class. Which design change best achieves this?

Medium
39

A junior developer created a class 'BankAccount' with public fields for balance and account number. After deployment, users are able to set negative balances, causing issues. Which OOP principle should have been applied to prevent this?

Easy
40

Refer to the exhibit. Why does the code fail to compile?

Easy
41

A developer writes a class 'Vehicle' with a method 'move()' that prints 'Vehicle moves'. A subclass 'Car' overrides 'move()' to print 'Car moves'. Given: Vehicle v = new Car(); v.move(); What is the output?

Medium
42

Refer to the exhibit. What is the potential issue with this singleton implementation in a multithreaded environment?

Hard
43

A Java application uses an interface 'Drawable' with a default method 'draw()'. A class 'Circle' implements Drawable but does not override draw(). Another class 'Square' implements Drawable and overrides draw(). Which statement is true about calling draw() on instances of Circle and Square?

Hard
44

Which TWO statements about interfaces in Java are true?

Hard
45

A class 'Base' has a method 'public void display() throws IOException'. Subclass 'Derived' overrides display(). Which exception specifications are allowed in the overriding method?

Hard
46

Which TWO statements are true about interfaces in Java?

Hard
47

class Parent { void show() { System.out.print("Parent"); } } class Child extends Parent { void show() { System.out.print("Child"); } } public class Test { public static void main(String[] args) { Parent p = new Child(); p.show(); } } What is the output?

Medium
48

A developer wants to prevent a method from being overridden. Which modifier should be used?

Medium
49

Which access modifier allows a member to be accessed only within the same class?

Easy
50

Refer to the exhibit. What is the output?

Hard
51

Refer to the exhibit. What is the problem with this class?

Medium
52

Which is the correct way to call a superclass constructor from a subclass constructor?

Easy
53

A developer writes a class 'Animal' with a method 'sound()'. The 'Cat' subclass overrides 'sound()'. If an Animal reference points to a Cat object, which method is called when sound() is invoked?

Easy
54

A developer creates an interface 'Drawable' with a single abstract method 'draw()'. They then create a class 'Circle' that implements Drawable but forgets to provide the draw() method. Circle is not declared abstract. What will happen when compiling Circle?

Hard
55

A developer wants to create a class that can be used to represent different types of vehicles (e.g., Car, Truck, Motorcycle) and each vehicle type should be able to start its own engine in a specific way. Which OOP concept should be used to allow the vehicle class to define a common interface while letting subclasses provide specific implementations?

Medium
56

Which three statements about constructors in Java are true? (Choose three.)

Medium
57

A security-sensitive class should not be extended by any other class. Which modifier should be applied to the class declaration?

Easy
58

Which design principle is violated by making all fields public in a class?

Medium

Frequently asked questions

What does the Object-Oriented Programming domain cover on the 1Z0-811 exam?
RAM tests your ability to identify, install, and troubleshoot memory types, speeds, and configurations for PCs.
How many questions are in this domain?
This page lists all 58 Object-Oriented Programming questions in the 1Z0-811 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Object-Oriented Programming questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.