350 Câu hỏi trắc nghiệm môn Lập trình mạng có đáp án - Phần 2

Cho biết kết xuất của đoạn mã sau: int x = 0, y = 4, z = 5; if (x > 2) { if (y < 5) { System.out.println("message one"); } else { System.out.println("message two"); } } else if (z > 5) { Syst

11/50

Cho biết kết xuất của đoạn mã sau:
int x = 0,
y = 4,
z = 5;
if (x > 2) {
if (y < 5) {
System.out.println("message one");
}
else {
System.out.println("message two");
}
}
else if (z > 5) {
System.out.println("message three");
}
else {
System.out.println("message four");
}

message one

message two

message three

message four

Giải thích

D là đáp án đúng