Oracle
1Z0-819 · Question #107
1Z0-819 Question #107: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #107. The question stem and answer options stay visible for context.
Question
Given:
enum QUALITY {
A(100), B(75), C(50);
int percent;
private QUALITY(int percent) {
this.percent = percent;
}
}
and
checkQuality(QUALITY A);
and
void checkQuality(QUALITY q) {
switch (q) {
case ?: Insert code here */ :
System.out.println("Best");
break;
default:
System.out.println("Not Best");
break;
}
}
Which code fragment can be inserted into the switch statement to print Best?
Options
- AQUALITY.valueOf()
- BA
- CtoString()
- DQUALITY.A
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 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.