Practice 1Z0-811 What is Java questions with full explanations on every answer.
Start practicing
What is Java — choose a session length
Free · No account required
Click any question to see the full explanation and answer options, or start a focused practice session above.
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?
2A team is designing a Java application that needs to run on different operating systems without modification. Which Java feature makes this possible?
3Which TWO statements correctly describe the Java language? (Choose two.)
4A 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?
5A 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?
6Arrange the steps to compile and run a Java program from the command line in the correct order.
7Arrange the steps to overload a method in Java in the correct order.
8Match each Java term to its correct definition.
9Match each OOP concept to its Java implementation.
10A developer says Java is platform-independent because of the JVM. Which statement best explains this?
11A company is developing a security-sensitive banking application. Which Java feature most directly enhances security?
12A team deploys a Java application and observes frequent Full GC pauses. Which garbage collector is designed to minimize pause times?
13What is the primary role of the Java Development Kit (JDK) compared to the JRE?
14An application is designed with private fields and public getter/setter methods. Which OOP principle does this exemplify?
15In the Java memory model, where are primitive local variables declared inside a method stored?
16What is the primary purpose of Java bytecode?
17During execution, the JVM uses Just-In-Time (JIT) compilation. What is its primary benefit?
18A company wants to run existing Java SE application code on an embedded device with limited resources. Which Java edition is designed for such environments?
19Which TWO statements are true about the Java programming language?
20Which THREE are valid components of the Java Virtual Machine (JVM)?
21Which TWO are characteristics of the Java Runtime Environment (JRE)?
22Given the output, which statement is true about this Java installation?
23What is the most likely cause of this error?
24Based on the command, which garbage collector is configured for this application?
25A 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?
26A developer compiles a Java program successfully but gets 'ClassNotFoundException' when running it. What is the most likely cause?
27A team is designing a new system that requires deploying independent services communicating over a network. Which Java technology is most suitable for this architecture?
28Which component of the Java platform is responsible for executing compiled bytecode?
29A company is upgrading from Java 8 to Java 11. Which advantage does the module system introduced in Java 9 provide?
30A 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?
31An application throws 'java.lang.OutOfMemoryError: Java heap space'. Which JVM option can help generate diagnostic information to identify the cause?
32Which TWO are true about the Java Runtime Environment (JRE)? (Choose two.)
33A 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.)
34Which THREE are benefits of Java's platform independence? (Choose three.)
35Given the javap output of a class file, which statement is correct about the Java version used to compile it?
36A 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?
37A 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?
38A 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?
39Which THREE of the following are key features of the Java programming language?
40Refer to the exhibit. A developer runs the command java -version on a system. Which statement about this Java installation is correct?
41A 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?
The What is Java domain covers the key concepts tested in this area of the 1Z0-811 exam blueprint published by Oracle. Courseiva provides free domain-focused practice, mock exams, missed-question review, and readiness tracking across all 1Z0-811 domains — no account required.
The Courseiva 1Z0-811 question bank contains 41 questions in the What is Java domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the What is Java domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included