nerdexam
Oracle

1Z0-811 · Question #47

1Z0-811 Question #47: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-811 to reveal the answer and full explanation for question #47. The question stem and answer options stay visible for context.

Java Basics

Question

Given the code of Student.java: class Course { String courseName; } public class Student { String stuName; public static void main(String[] args) { Student s = new Student(); s.stuName = args[0]; Course c = new Course(); c.courseName = args[1]; System.out.println(s.stuName + " is studying "+ c.courseName); } } Which statement is true?

Options

  • AThe commands: javac Student.java java Student Richard William Java are used to print Richard William is studying Java.
  • BThe commands: javac Course.java javac Student.java java Course java Student "Richard William" Java are used to print Richard William is studying Java.
  • CThe commands: javac Student.java java Student Richard William Java are used to print Richard William is studying Java.
  • DThe commands: javac Student.java java Student "Richard William" Java are used to print Richard William is studying Java.

Unlock 1Z0-811 to see the answer

You've previewed enough free 1Z0-811 questions. Unlock 1Z0-811 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.

Topics

#compilation#command-line arguments#array indexing#JVM execution
Full 1Z0-811 Practice