1Z0-829 · topic practice

Controlling Program Flow practice questions

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

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Reviewed byJohnson Ajibi· MSc IT Security
16 questionsDomain: Controlling Program Flow

What the exam tests

What to know about Controlling Program Flow

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 Controlling Program Flow 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 Controlling Program Flow 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

Practice set

Controlling Program Flow questions

16 questions · select your answer, then reveal the explanation

A developer writes code to iterate over a list of strings and print each element. The code uses an enhanced for loop. Which statement is true about the enhanced for loop?

Given the code snippet:

int x = 10;
if (x > 5) {

System.out.print("A");

} else if (x > 7) {

System.out.print("B");

} else {

System.out.print("C");

}

What is the output?

A method contains a try-with-resources statement that uses two resources: a FileInputStream and a BufferedInputStream. The FileInputStream constructor throws a FileNotFoundException. Which statement about resource closing is true?

Which TWO statements are true about the switch statement in Java?

Which THREE statements are true about loops in Java?

You are developing a high-frequency trading application that processes a stream of market data ticks. Each tick is represented by a Tick object with fields: long timestamp, String symbol, double price, int volume. Ticks arrive in real-time and must be processed in order. A bug is reported: the application occasionally processes a tick out of order, causing incorrect trade decisions. The processing logic uses a while loop to read from a blocking queue and process each tick. The code is:

BlockingQueue<Tick> queue = new LinkedBlockingQueue<>();

while (true) {

Tick tick = queue.take(); process(tick);

}

After investigation, you find that the queue is fed by multiple producer threads that sometimes reorder ticks due to network delays. Which course of action best ensures ticks are processed in the correct chronological order without sacrificing throughput?

Which loop construct guarantees that the body executes at least once?

What is the output of the program?

Exhibit

Refer to the exhibit.

public class LoopTest {
    public static void main(String[] args) {
        outer:
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (i + j > 3) {
                    break outer;
                }
                System.out.print(i + j + " ");
            }
        }
    }
}

Which TWO statements about the switch statement in Java are correct?

A Java application processes a list of orders. Each order has a status: NEW, PROCESSING, SHIPPED, or DELIVERED. The code must print a message based on the status: - If NEW: "Order received" - If PROCESSING: "Order in progress" - If SHIPPED: "Order shipped" - If DELIVERED: "Order delivered" - For any other status: "Unknown status"

The developer writes the following code using a switch expression:

String message = switch (status) { case NEW -> "Order received"; case PROCESSING -> "Order in progress"; case SHIPPED -> "Order shipped"; case DELIVERED -> "Order delivered"; default -> "Unknown status";

};

System.out.println(message);

What is the correct course of action to ensure the code compiles and runs correctly?

Which TWO statements about the switch statement in Java are true?

Question 12hardmultiple choice
Read the full NAT/PAT explanation →

A Java developer is writing a batch processing application that reads records from a database and processes them. The processing must continue even if some records cause exceptions (e.g., data conversion errors). However, the application must log each failed record and its error, then continue with the next record. The developer uses a for loop to iterate over a list of records. Inside the loop, a try-catch block wraps the processing logic. After implementing, the developer notices that when an exception occurs, the loop terminates prematurely instead of continuing. The code structure is:

List<Record> records = fetchRecords();

for (Record rec : records) {

try { process(rec);

} catch (Exception e) {

log.error("Failed to process: " + rec.getId(), e);

}
}

What is the most likely reason for the premature termination?

Order the steps to properly handle resources using try-with-resources in Java.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Order the steps to handle checked exceptions in a method that throws IOException.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4
5Step 5

Match each Java module directive to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Makes a package accessible to other modules

Specifies a dependency on another module

Allows reflective access to a package at runtime

Declares a service implementation

Specifies a service interface consumed by the module

Match each I/O stream class to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Reads text from a character-input stream, buffering characters

Reads raw bytes from a file

Writes primitive types and Java objects to an OutputStream

Prints formatted representations of objects to a text-output stream

Reads primitive Java data types from an underlying input stream

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Controlling Program Flow sessions

Start a Controlling Program Flow only practice session

Every question in these sessions is drawn from the Controlling Program Flow domain — nothing else.

Related practice questions

Related 1Z0-829 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the 1Z0-829 exam test about Controlling Program Flow?
RAM tests your ability to identify, install, and troubleshoot memory types, speeds, and configurations for PCs.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Controlling Program Flow questions in a focused session?
Yes — the session launcher on this page draws every question from the Controlling Program Flow domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other 1Z0-829 topics?
Use the topic links above to move to related areas, or go back to the 1Z0-829 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the 1Z0-829 exam covers. They are not copied from any real exam or dump site.