Which statement correctly describes the roles of JDK and IDE in setting up a Java testing environment?
Think about what you need to compile and run Java code versus what helps you write and debug it easily.
The JDK (Java Development Kit) includes the compiler and runtime needed to build and run Java programs. The IDE (Integrated Development Environment) provides a user-friendly interface with tools to write, debug, and manage code efficiently.
What is the expected output when running java -version after correctly installing JDK 17?
java -version
Check the version number and format typical for OpenJDK 17 output.
After installing JDK 17, the java -version command shows the OpenJDK version 17 with its release date. Other outputs indicate errors or different Java versions.
Which path correctly points to the JDK installation folder on a Windows machine after installing JDK 17?
JDK is usually installed under Program Files in the Java folder, not in System32 or user folders.
The JDK installation folder is typically under C:\Program Files\Java\jdk-17. The JRE folder is different and does not contain development tools.
Which assertion correctly verifies that Selenium WebDriver is properly added as a dependency in a Maven-based Java IDE project?
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.8.0</version>
</dependency>Think about where Maven dependencies are declared in the project configuration file.
Maven dependencies must be declared inside the
You run a Selenium Java test in your IDE but get a java.lang.NoClassDefFoundError for org.openqa.selenium.WebDriver. What is the most likely cause?
Consider what causes class loading errors related to missing classes in Java projects.
A NoClassDefFoundError usually means the required Selenium WebDriver classes are not found at runtime because the dependency is missing or not included in the build path. JDK version or browser driver issues cause different errors.