nerdexam
Exams1Z0-803Questions#145
Oracle

1Z0-803 · Question #145

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

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

Question

Given: class Cake { int model; String flavor; Cake() { model = 0; flavor = "Unknown"; } } public class Test { public static void main(String[] args) { Cake c = new Cake(); bake1(c); System.out.println(c.model + " " + c.flavor); bake2(c); System.out.println(c.model + " " + c.flavor); } public static Cake bake1(Cake c) { c.flavor = "Strawberry"; c.model = 1200; return c; } public static void bake2(Cake c) { c.flavor = "Chocolate"; c.model = 1230; return; } } What is the result?

Options

  • A0 Unknown
  • B1200 Strawberry
  • C1200 Strawberry
  • DCompilation fails

Unlock 1Z0-803 to see the answer

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

Full 1Z0-803 Practice
Given: class Cake { int model; String flavor; Cake() { model = 0;... | 1Z0-803 Q#145 Answer | NerdExam