Oracle
1Z0-809 · Question #84
1Z0-809 Question #84: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #84. The question stem and answer options stay visible for context.
Question
return output;
}
and the code fragment:
Book b1 = new Book (101, "Java Programming");
Book b2 = new Book (102, "Java Programming");
System.out.println (b1.equals(b2)); //line n2
Which statement is true?
Options
- AThe program prints true.
- BThe program prints false.
- CA compilation error occurs. To ensure successful compilation, replace line n1 with: book1.equals (Book b2);
- DA compilation error occurs. To ensure successful compilation, replace line n2 with: System.out.println (b1.equals((Object) b2));
Unlock 1Z0-809 to see the answer
You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 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.