You must be able to pick the right component or command for a scenario: use the JDK to compile, the JRE to run, and understand the JVM executes bytecode. The key point is that platform independence comes from bytecode plus the JVM, not from the source language alone.
Start practicing
What is Java — choose a session length
Free · No account required
Domain overview
This domain covers Java's core identity: the JDK versus JRE versus JVM, how source is compiled to bytecode and executed, platform independence, and JIT compilation. Questions are scenario-based, asking you to choose the correct tool, command, or runtime component for a described developer situation.
Exam objectives
Distinguishing JDK, JRE, and JVM roles and which components each provides
Compiling source with javac and running bytecode with the java launcher
How bytecode and the JVM enable write-once-run-anywhere platform independence
Just-In-Time compilation improving runtime performance by compiling hot bytecode to native code
Assuming a JRE alone can compile Java source; compilation requires the JDK's javac compiler, not just the runtime environment.
Confusing the JVM with the JRE or JDK; the JVM is the execution engine, while the JRE bundles it with libraries.
Believing bytecode is interpreted only; the JVM also uses JIT compilation to convert frequently used code to native instructions.
Click any question to see the full explanation and answer options, or start a focused practice session above.
A team is designing a Java application that needs to run on different operating systems without modification. Which Java feature makes this possible?
2Which TWO statements correctly describe the Java language? (Choose two.)
3A 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?
4Arrange the steps to compile and run a Java program from the command line in the correct order.
5Arrange the steps to overload a method in Java in the correct order.
6Match each Java term to its correct definition.
7A developer says Java is platform-independent because of the JVM. Which statement best explains this?
8A company is developing a security-sensitive banking application. Which Java feature most directly enhances security?
9A team deploys a Java application and observes frequent Full GC pauses. Which garbage collector is designed to minimize pause times?
10What is the primary role of the Java Development Kit (JDK) compared to the JRE?
11In the Java memory model, where are primitive local variables declared inside a method stored?
12What is the primary purpose of Java bytecode?
13During execution, the JVM uses Just-In-Time (JIT) compilation. What is its primary benefit?
14Which TWO statements are true about the Java programming language?
15Which THREE are valid components of the Java Virtual Machine (JVM)?
16What is the most likely cause of this error?
17A 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?
18A developer compiles a Java program successfully but gets 'ClassNotFoundException' when running it. What is the most likely cause?
19Which component of the Java platform is responsible for executing compiled bytecode?
20A company is upgrading from Java 8 to Java 11. Which advantage does the module system introduced in Java 9 provide?
21A 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?
22An application throws 'java.lang.OutOfMemoryError: Java heap space'. Which JVM option can help generate diagnostic information to identify the cause?
23Which TWO are true about the Java Runtime Environment (JRE)? (Choose two.)
24Which THREE are benefits of Java's platform independence? (Choose three.)
25A 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?
26Which THREE of the following are key features of the Java programming language?
27A junior developer asks how Java achieves platform independence. Which statement best describes the role of the Java Virtual Machine (JVM) in this process?
28A university student installs the JDK on a Windows laptop and wants to compile and run a simple HelloWorld.java file from the command line without using an IDE. After compilation, which command should the student use to execute the program?
29A development team is choosing a Java edition for a project that must run on desktop computers and also access a central database. The application will use JavaFX for its user interface and JDBC for database connectivity. Which Java edition is the most appropriate choice?
30A development team is choosing a Java edition for a project that must run on a variety of desktop operating systems, including Windows, macOS, and Linux, while providing a rich graphical user interface and access to local files. Which Java edition is the most appropriate choice?
31A development team is choosing a Java platform for a new back-end service that must run on a standard server operating system, use the full standard class library, and be deployable as a standalone application without a browser. The service will not run on mobile devices or embedded hardware. Which Java edition should the team select?
32A developer at a small startup has written a Java class named InventoryManager in a file, but when the developer tries to compile it, the compiler reports an error about the file name. The class is declared as public and the file is currently named inventorymanager.java. What is the most likely cause of this compilation error?
33A developer writes a Java source file named Greeting.java that contains a class named Greeting with a main method. The developer compiles it successfully with javac Greeting.java. Which artifact is produced, and what does it contain?
34A developer writes a Java program and compiles it successfully with javac. When running the program with java MyApp, the JVM reports NoClassDefFoundError for a class that is referenced in the code. The class file for that referenced class exists in a separate directory not listed in the classpath. What is the most likely explanation?
35A developer writes a short program in a file named Hello.java that declares a class named Hello with a main method and prints a greeting. The developer compiles it successfully and then runs the command 'java Hello.java' from the directory containing the source file. Which statement best describes what happens?
36A junior developer is learning about Java and asks how Java achieves platform independence. The developer has heard that Java programs run on many different operating systems without recompilation. Which statement best explains how Java provides this capability?
37A junior developer is reviewing the characteristics of the Java programming language and the Java platform. Which TWO statements accurately describe Java? (Choose two.)
38A developer is explaining the role of the Java Virtual Machine to a colleague who is new to the platform. Which two statements accurately describe the JVM? (Choose two.)
39A company is deploying a Java application that must run on a variety of devices, including some with limited memory and processing power. The application does not require a graphical user interface and will be used for simple data collection. Which Java edition is specifically designed for such constrained environments?
40A developer is preparing to run a Java application on a colleague's computer. The colleague has installed the Java Runtime Environment (JRE) but not the Java Development Kit (JDK). The developer needs to explain what the colleague can and cannot do. Which statement is accurate?
41A developer new to Java writes a source file that begins with the line 'public class HelloWorld {' and saves it as hello.java. When compiling with javac hello.java, the compiler reports an error. What is the most likely cause?
42A junior developer writes a Java source file named Payroll.java in a project folder. They open a terminal in that folder and run the command: javac Payroll.java. The command completes with no messages, and a new file named Payroll.class appears in the folder. What has actually happened?
43A developer is explaining the key characteristics of the Java programming language to a colleague. Which two statements accurately describe Java? (Choose two.)
44A developer is reviewing a Java program that uses a class named String from the java.lang package. The developer notices that no import statement for java.lang is present in the source file, yet the program compiles successfully. The developer asks why the import is not required. Which statement best explains this behavior?
45A start-up is choosing a Java platform for a new customer-facing web application. The team needs the full standard class library plus the ability to serve HTTP requests directly and deploy packaged web components, while still writing plain Java code with no proprietary vendor APIs. Which Java platform edition should they select?
46A team is evaluating Java for a new cross-platform project. The team lead asks for a summary of key characteristics of the Java programming language and platform. Which two statements accurately describe Java? (Choose two.)
47A developer installs a JDK on a workstation and wants to write, compile, and run a small console program named Inventory.java. Which statement correctly describes the relationship between the tools they will use and the components of the Java platform in this workflow?
48A team is documenting the execution model of their Java service for new hires. They want to describe accurately what happens between launching the application and the code running on the server's processor. Which two statements correctly describe this execution model? (Choose two.)
49A developer copies a compiled class file from a Windows workstation to a Linux server, then runs it with the java launcher. The program starts and behaves identically on both systems. A colleague claims this proves the class file contains Linux machine instructions. Which explanation best accounts for the observed behaviour?
Deep-dive questions
The most-searched questions in this domain — detailed explanations, worked examples, full answer breakdowns.
You must be able to pick the right component or command for a scenario: use the JDK to compile, the JRE to run, and understand the JVM executes bytecode. The key point is that platform independence comes from bytecode plus the JVM, not from the source language alone.
The Courseiva 1Z0-811 question bank contains 49 questions in the What is Java domain, covering the 15% of the exam attributed to this domain in the official Oracle blueprint. 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