nerdexam
Exams1Z0-803Questions#78
Oracle

1Z0-803 · Question #78

1Z0-803 Question #78: Real Exam Question with Answer & Explanation

The correct answer is C: Student student1 = new Student();. See the full explanation below for the reasoning.

Question

View the exhibit: public class Student { public String name = ""; public int age = 0; public String major = "Undeclared"; public boolean fulltime = true; public void display() { System.out.println("Name: " + name + " Major: " + major); } public boolean isFullTime() { return fulltime; } } Which line of code initializes a student instance?

Options

  • AStudent student1;
  • BStudent student1 = Student.new();
  • CStudent student1 = new Student();
  • DStudent student1 = Student();

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice