Courseiva

1Z0-811 · domain

What is Java

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

39 questions11 easy16 medium12 hard

Focused practice

Practice What is Java 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 What is Java

What is Java 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 What is Java 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.

Question index

All What is Java questions (39)

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

1

Match each OOP concept to its Java implementation.

Medium
2

A developer is tasked with deploying a Java application to a customer's server. The customer has only a JRE installed and no internet access. The application uses Java NIO and requires reading configuration files from the classpath. The application compiles and runs fine on the developer's machine which has JDK 11. However, when deploying the compiled JAR to the customer's JRE 11, it throws a 'NoClassDefFoundError' for a class that is part of the JDK's internal API (e.g., com.sun.nio.file.SensitivityWatchEventModifier). The developer is confused because the class is in the standard library. Which action should be taken to resolve the issue?

Medium
3

A large enterprise application is experiencing intermittent crashes on a production server running Java 8. The crash logs show 'java.lang.OutOfMemoryError: Metaspace'. The application heavily uses frameworks like Hibernate and JasperReports, which generate many classes dynamically at runtime. The server is configured with default JVM options except for -Xmx2g. A junior administrator suggests increasing -Xmx to 4g. What is the most effective solution to prevent these crashes?

Hard
4

Given the javap output of a class file, which statement is correct about the Java version used to compile it?

Medium
5

In the Java memory model, where are primitive local variables declared inside a method stored?

Hard
6

A company wants to develop a Java application that can run on Windows, Linux, and macOS without any code changes. Which Java feature makes this possible?

Easy
7

What is the most likely cause of this error?

Medium
8

A developer says Java is platform-independent because of the JVM. Which statement best explains this?

Easy
9

Match each Java term to its correct definition.

Medium
10

A team is designing a new system that requires deploying independent services communicating over a network. Which Java technology is most suitable for this architecture?

Hard
11

Which THREE of the following are key features of the Java programming language?

Easy
12

Which TWO statements are true about the Java programming language?

Easy
13

Which TWO are true about the Java Runtime Environment (JRE)? (Choose two.)

Easy
14

A developer has written a Java program that uses third-party libraries. Which TWO actions are necessary to run the program on a different machine? (Choose two.)

Medium
15

Which THREE are benefits of Java's platform independence? (Choose three.)

Hard
16

Refer to the exhibit. A developer runs the command java -version on a system. Which statement about this Java installation is correct?

Medium
17

Arrange the steps to overload a method in Java in the correct order.

Medium
18

A team deploys a Java application and observes frequent Full GC pauses. Which garbage collector is designed to minimize pause times?

Hard
19

A junior developer writes a simple 'Hello World' program and saves it as HelloWorld.java. He compiles it successfully with 'javac HelloWorld.java', confirming that HelloWorld.class is created in the current directory. When he tries to run it with the command 'java HelloWorld', the system returns 'Error: Could not find or load main class HelloWorld'. The current directory is indeed the one containing HelloWorld.class. He has JAVA_HOME set to the JDK installation directory and has verified that java is in the PATH. What is the most likely cause?

Easy
20

Based on the command, which garbage collector is configured for this application?

Hard
21

Which TWO are characteristics of the Java Runtime Environment (JRE)?

Hard
22

Which TWO statements correctly describe the Java language? (Choose two.)

Hard
23

A company is developing a Java-based inventory management system. The system runs on a single server and processes up to 1000 concurrent requests. The development team has implemented the code using multiple threads to handle requests. Recently, the system has been experiencing intermittent data corruption in the inventory counts. After reviewing the code, the team suspects that the issue is related to thread safety. The team is considering the following solutions: (A) Use the 'synchronized' keyword on all methods that update inventory counts. (B) Use 'volatile' keyword on the inventory count variables. (C) Use 'AtomicInteger' for inventory counts. (D) Increase the number of threads to handle requests faster. Which solution should the team implement to fix the data corruption issue with minimal performance impact?

Hard
24

Which THREE are valid components of the Java Virtual Machine (JVM)?

Medium
25

A company is developing a security-sensitive banking application. Which Java feature most directly enhances security?

Medium
26

A company is upgrading from Java 8 to Java 11. Which advantage does the module system introduced in Java 9 provide?

Medium
27

A developer compiles a Java program successfully but gets 'ClassNotFoundException' when running it. What is the most likely cause?

Medium
28

Given the output, which statement is true about this Java installation?

Easy
29

Arrange the steps to compile and run a Java program from the command line in the correct order.

Medium
30

A team is designing a Java application that needs to run on different operating systems without modification. Which Java feature makes this possible?

Easy
31

What is the primary purpose of Java bytecode?

Easy
32

A development team is building a modular Java application using Java 17. They have defined a module named com.myapp with a module-info.java that includes 'requires com.thirdparty.lib;'. The com.thirdparty.lib module is a third-party library packaged as a modular JAR with its own module-info.class. The application compiles successfully using javac with the module path pointing to the directory containing the JAR. However, when starting the application with java --module-path <path> --module com.myapp, a NoClassDefFoundError occurs for a class from com.thirdparty.lib. The error message indicates the class is not found. The team has confirmed that the JAR file is present in the specified module path and that the class exists in the JAR. No other errors or warnings are displayed. The team is puzzled because the code compiles without issues. What is the most likely cause of this runtime error?

Hard
33

An application throws 'java.lang.OutOfMemoryError: Java heap space'. Which JVM option can help generate diagnostic information to identify the cause?

Easy
34

What is the primary role of the Java Development Kit (JDK) compared to the JRE?

Easy
35

A developer writes a multi-threaded application that runs on Windows. To ensure the same bytecode runs without modification on Linux and macOS, which Java feature is essential?

Hard
36

A company wants to run existing Java SE application code on an embedded device with limited resources. Which Java edition is designed for such environments?

Hard
37

During execution, the JVM uses Just-In-Time (JIT) compilation. What is its primary benefit?

Medium
38

A developer is writing a Java application that processes a large number of transactions. The application must ensure that each transaction is committed only if all steps complete successfully, otherwise the entire transaction should be rolled back. Which Java concept should the developer use to implement this requirement?

Medium
39

A developer runs the command shown in the exhibit. The developer wants to ensure the application uses the latest available language features. Which action should the developer take?

Medium

Frequently asked questions

What does the What is Java domain cover on the 1Z0-811 exam?
What is Java questions test whether you can apply the concept in context, not just recognise a definition.
How many questions are in this domain?
This page lists all 39 What is Java 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 What is Java questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
oracle-java-foundations ORACLE-JAVA-FOUNDATIONS what is java Practice Questions