1Z0-811 · topic practice

Exception Handling and Development Tools practice questions

Practise Oracle Java Foundations 1Z0-811 Exception Handling and Development Tools practice questions — original exam-style scenarios with answer choices, explanations, and analysis of common mistakes.

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
20 questionsDomain: Exception Handling and Development Tools

What the exam tests

What to know about Exception Handling and Development Tools

Exception Handling and Development Tools questions test whether you can apply the concept in context, not just recognise a definition.

How the topic appears in realistic exam-style scenarios.

Which detail in the question changes the correct answer.

How to eliminate plausible but wrong options.

How to connect the question back to the wider exam objective.

Watch out for

Common Exception Handling and Development Tools exam traps

  • Answering from memory before reading the full scenario.
  • Missing a constraint such as cost, availability, security, scope or command context.
  • Choosing a broad answer when the question asks for the most specific fix.
  • Ignoring why the wrong options are tempting.

Practice set

Exception Handling and Development Tools questions

20 questions · select your answer, then reveal the explanation

A developer writes a method that reads a file and processes its contents. If the file does not exist, the method should notify the caller. Which exception should the method declare in its throws clause?

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

A team is developing a Java application that uses many third-party libraries. One library throws a checked exception that is not declared in its method signature. Which approach best handles this situation?

Which of the following is the best practice for resource management in Java?

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

A developer encounters an ArrayIndexOutOfBoundsException while running a unit test. The stack trace shows the error occurs in a method that is called from many places. Which tool or technique would most efficiently identify the specific call path?

Which statement about the Java compiler is true?

A method throws a checked exception. Which of the following is the correct way to handle it in the calling method?

Which command is used to run a Java application from the command line?

Which TWO statements about the finally block are true? (Choose two.)

Which THREE are checked exceptions in Java? (Choose three.)

Given the stack trace above, which line in MyClass.java caused the exception?

Exhibit

Refer to the exhibit.

```
Exception in thread "main" java.lang.NullPointerException
    at com.example.MyClass.process(MyClass.java:25)
    at com.example.Main.main(Main.java:10)
```

Given the compilation error above, which fix would resolve the error?

Exhibit

Refer to the exhibit.

```
$ javac MyApp.java
MyApp.java:5: error: unreported exception FileNotFoundException; must be caught or declared to be thrown
        FileReader fr = new FileReader("file.txt");
                        ^
1 error
```

You are a Java developer at a financial firm. The application processes transactions from a queue. The team recently migrated from Java 8 to Java 11. After the migration, the application intermittently throws an exception: 'java.lang.reflect.InaccessibleObjectException: Unable to make field private final byte[] java.lang.String.value accessible: module java.base does not 'opens java.lang' to unnamed module'. This error occurs when the application tries to use reflection to access private fields of String objects for serialization. The application runs on a server where you cannot modify the JVM startup scripts. However, you can modify the application code and the module-info.java file. You need to resolve the exception without breaking existing functionality. Which approach should you take?

Arrange the steps to use a for loop to iterate over an array in Java in the correct order.

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 keyword to its use.

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

Concepts
Matches

Prevents modification: variable constant, method override, class inheritance

Belongs to the class rather than instances

Cannot be instantiated; used for classes and methods

Ensures mutual exclusion in multithreading

Marks field to be ignored during serialization

A developer writes a method that reads a file and must ensure the file is closed even if an exception occurs. Which construct should be used?

Which of the following exceptions is a checked exception?

A method declares throws FileNotFoundException and SQLException. Which statement about the caller is true?

What is the output if an ArithmeticException occurs in the try block and there is a finally block?

Which command compiles a Java file and generates a .class file?

A custom exception class must extend which class to be a checked exception?

Free account

Track your progress over time

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

Focused Exception Handling and Development Tools sessions

Start a Exception Handling and Development Tools only practice session

Every question in these sessions is drawn from the Exception Handling and Development Tools domain — nothing else.

Related practice questions

Related 1Z0-811 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the 1Z0-811 exam test about Exception Handling and Development Tools?
Exception Handling and Development Tools questions test whether you can apply the concept in context, not just recognise a definition.
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 Exception Handling and Development Tools questions in a focused session?
Yes — the session launcher on this page draws every question from the Exception Handling and Development Tools 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-811 topics?
Use the topic links above to move to related areas, or go back to the 1Z0-811 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-811 exam covers. They are not copied from any real exam or dump site.