Java SE 8 Programmer 1Z0–808 Practice Full Test 1
© examsiri.com
Question : 54 of 84
Marks:
+1,
-0
Given:
Which code fragment can replace the if block?
String stuff = "TV";
String res = null;
if (stuff.equals("TV")) {
res = "Walter";
} else if (stuff.equals("Movie")) {
res = "White";
} else {
res = "No Result";
}
Which code fragment can replace the if block?
Go to Question: