1Z0-811 What is Java Practice Question
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) ```
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?
⚠ Common exam trap
Test-takers frequently confuse upgrading the JVM (runtime) with upgrading the JDK (development kit), or think that compiler flags like -source and -target can retroactively add new language features to an older JDK.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Download and install a newer version of the JDK.
The latest available language features (e.g., pattern matching, sealed classes, records) are tied to the JDK version. Downloading and installing a newer JDK provides both the compiler (javac) and runtime (JVM) that support those features. Simply upgrading the JVM (Option D) or using -source/-target flags (Option C) does not enable new language syntax in the compiler if the JDK itself is outdated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Download and install a newer version of the JDK.
Why this is correct
A newer JDK includes both compiler and runtime with latest features.
- ✗
Enable lambda expressions by setting the -enable-lambdas flag.
Why it's wrong here
No such flag; lambdas are supported in Java 8.
- ✗
Use the -source and -target flags to compile for a newer version.
Why it's wrong here
These flags only affect compilation; the runtime still uses the old version.
- ✗
Upgrade the JVM to the latest version.
Why it's wrong here
The JVM version matches the JDK; the JDK itself must be upgraded.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 1Z0-811 question from scratch — 481 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.