Courseiva
Knowledge + Practice
CertificationsVendorsCareer RoadmapsLabs & ToolsStudy GuidesGlossaryPractice Questions
C
Courseiva

Free IT certification practice questions with explained answers for CCNA, CompTIA, AWS, Azure, Google Cloud, and more.

Certification Practice Questions

CCNA practice questionsSecurity+ SY0-701 practice questionsAWS SAA-C03 practice questionsAZ-104 practice questionsAZ-900 practice questionsCLF-C02 practice questionsA+ Core 1 practice questionsGoogle Cloud ACE practice questionsCySA+ CS0-003 practice questionsNetwork+ N10-009 practice questions
View all certifications →

Product

CertificationsCertification PathsExam TopicsPractice TestsExam Dumps vs Practice TestsStudy HubComparisons

Company

AboutContactEditorial PolicyQuestion Writing PolicyTrust Center

Legal

Privacy PolicyTerms of Service

Courseiva is a free IT certification practice platform offering original exam-style practice questions, detailed explanations, topic-based practice, mock exams, readiness tracking, and study analytics for Cisco, CompTIA, Microsoft, AWS, and other technology certifications.

© 2026 Courseiva. Courseiva is operated by JTNetSolutions Ltd. All rights reserved.

Courseiva is an independent certification practice platform and is not affiliated with, endorsed by, or sponsored by Cisco, Microsoft, AWS, CompTIA, Google, ISC2, ISACA, or any other certification vendor. Vendor names and certification marks are used only to identify the exams learners are preparing for.

← What is Java practice sets

1Z0-811 What is Java • Complete Question Bank

1Z0-811 What is Java — All Questions With Answers

Complete 1Z0-811 What is Java question bank — all 0 questions with answers and detailed explanations.

41
Questions
Free
No signup
Certifications/1Z0-811/Practice Test/What is Java/All Questions
Question 1mediummultiple choice
Read the full What is Java explanation →

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?

Question 2easymultiple choice
Read the full What is Java explanation →

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

Question 3hardmulti select
Read the full What is Java explanation →

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

Question 4mediummultiple choice
Read the full What is Java explanation →

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?

Exhibit

Refer to the exhibit.
```
$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
```
Question 5hardmultiple choice
Read the full What is Java explanation →

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?

Question 6mediumdrag order
Read the full What is Java explanation →

Arrange the steps to compile and run a Java program from the command line 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
Question 7mediumdrag order
Read the full What is Java explanation →

Arrange the steps to overload a method 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
Question 8mediummatching
Read the full What is Java explanation →

Match each Java term to its correct definition.

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

Concepts
Matches

Java Virtual Machine that executes bytecode

Runtime environment including JVM and core libraries

Development kit including JRE and tools like javac

Just-In-Time compiler that optimizes bytecode at runtime

Garbage Collector that automatically manages memory

Question 9mediummatching
Read the full What is Java explanation →

Match each OOP concept to its Java implementation.

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

Concepts
Matches

Using private fields with public getters/setters

Using extends keyword to derive a class

Method overriding and overloading

Using abstract classes and interfaces

Using fields that reference other objects

Question 10easymultiple choice
Read the full What is Java explanation →

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

Question 11mediummultiple choice
Read the full What is Java explanation →

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

Question 12hardmultiple choice
Read the full What is Java explanation →

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

Question 13easymultiple choice
Read the full What is Java explanation →

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

Question 14mediummultiple choice
Read the full What is Java explanation →

An application is designed with private fields and public getter/setter methods. Which OOP principle does this exemplify?

Question 15hardmultiple choice
Read the full What is Java explanation →

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

Question 16easymultiple choice
Read the full What is Java explanation →

What is the primary purpose of Java bytecode?

Question 17mediummultiple choice
Read the full What is Java explanation →

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

Question 18hardmultiple choice
Read the full What is Java explanation →

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?

Question 19easymulti select
Read the full What is Java explanation →

Which TWO statements are true about the Java programming language?

Question 20mediummulti select
Read the full What is Java explanation →

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

Question 21hardmulti select
Read the full What is Java explanation →

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

Question 22easymultiple choice
Read the full What is Java explanation →

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

Exhibit

Refer to the exhibit.
```
$ java -version
java version "11.0.12" 2021-07-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS, mixed mode)
```
Question 23mediummultiple choice
Read the full What is Java explanation →

What is the most likely cause of this error?

Exhibit

Refer to the exhibit.
```
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at com.example.MyClass.createObjects(MyClass.java:15)
```
Question 24hardmultiple choice
Read the full What is Java explanation →

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

Exhibit

Refer to the exhibit.
```
java -Xms512m -Xmx2g -XX:+UseG1GC -jar application.jar
```
Question 25easymultiple choice
Read the full What is Java explanation →

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?

Question 26mediummultiple choice
Read the full What is Java explanation →

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

Question 27hardmultiple choice
Read the full What is Java explanation →

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?

Question 28easymultiple choice
Read the full What is Java explanation →

Which component of the Java platform is responsible for executing compiled bytecode?

Question 29mediummultiple choice
Read the full What is Java explanation →

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

Question 30hardmultiple choice
Read the full What is Java explanation →

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?

Question 31easymultiple choice
Read the full What is Java explanation →

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

Question 32easymulti select
Read the full What is Java explanation →

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

Question 33mediummulti select
Read the full What is Java explanation →

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.)

Question 34hardmulti select
Read the full What is Java explanation →

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

Question 35mediummultiple choice
Read the full What is Java explanation →

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

Exhibit

Refer to the exhibit.
minor version: 0
major version: 55
flags: ACC_PUBLIC, ACC_SUPER
Question 36mediummultiple choice
Read the full NAT/PAT explanation →

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?

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

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?

Question 38easymultiple choice
Read the full NAT/PAT explanation →

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?

Question 39easymulti select
Read the full What is Java explanation →

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

Question 40mediummultiple choice
Read the full What is Java explanation →

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

Exhibit

java version "11.0.12" 2021-07-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS)
Java HotSpot(TM) 64-Bit Server VM (build 11.0.12+8-LTS, mixed mode)
Question 41hardmultiple choice
Read the full NAT/PAT explanation →

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?

Practice tests

Scored 10-question sessions with instant feedback and explanations.

1Z0-811 Practice Test 1 — 10 Questions→1Z0-811 Practice Test 2 — 10 Questions→1Z0-811 Practice Test 3 — 10 Questions→1Z0-811 Practice Test 4 — 10 Questions→1Z0-811 Practice Test 5 — 10 Questions→1Z0-811 Practice Exam 1 — 20 Questions→1Z0-811 Practice Exam 2 — 20 Questions→1Z0-811 Practice Exam 3 — 20 Questions→1Z0-811 Practice Exam 4 — 20 Questions→Free 1Z0-811 Practice Test 1 — 30 Questions→Free 1Z0-811 Practice Test 2 — 30 Questions→Free 1Z0-811 Practice Test 3 — 30 Questions→1Z0-811 Practice Questions 1 — 50 Questions→1Z0-811 Practice Questions 2 — 50 Questions→1Z0-811 Exam Simulation 1 — 100 Questions→

Practice by domain

Each domain maps to a weighted exam section. Focus on the domain where you are weakest.

What is JavaJava Basics and SyntaxPrimitives, Strings and OperatorsControl Flow and LoopsArrays and MethodsObject-Oriented ProgrammingException Handling and Development Tools

Practice by scenario

Filter questions by type — troubleshooting, exhibit, drag-and-drop, PBQ, ACLs, OSPF, and more.

Browse scenarios→

Continue studying

All What is Java setsAll What is Java questions1Z0-811 Practice Hub