Oracle
1Z0-851 · Question #80
1Z0-851 Question #80: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #80. The question stem and answer options stay visible for context.
Question
Given: package com.company.application; public class MainClass { public static void main(String[] args) {} } And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory). Which two java commands entered at the command line will run MainClass? (Choose two.)
Options
- Ajava MainClass if run from the /apps directory
- Bjava com.company.application.MainClass if run from the /apps directory
- Cjava -classpath /apps com.company.application.MainClass if run from any directory
- Djava -classpath . MainClass if run from the /apps/com/company/application directory
- Ejava -classpath /apps/com/company/application:. MainClass if run from the /apps directory
- Fjava com.company.application.MainClass if run from the /apps/com/company/application directory
Unlock 1Z0-851 to see the answer
You've previewed enough free 1Z0-851 questions. Unlock 1Z0-851 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.