Oracle
1Z0-851 · Question #237
1Z0-851 Question #237: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-851 to reveal the answer and full explanation for question #237. The question stem and answer options stay visible for context.
Question
Given a correctly compiled class whose source code is: 1. package com.sun.sjcp; 2. 3. public class Commander { 4. public static void main(String[] args) { 5. // more code here 6. } 7. } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains "." (current directory). Which command line correctly runs Commander?
Options
- Ajava Commander
- Bjava com.sun.sjcp.Commander
- Cjava com/sun/sjcp/Commander
- Djava -cp com.sun.sjcp Commander
- Ejava -cp com/sun/sjcp Commander
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.