nerdexam
Exams1Z0-803Questions#141
Oracle

1Z0-803 · Question #141

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

The correct answer is A: Compilation fails. Exception in thread "main" java.lang.Error: Unresolved compilation problems:

Question

Given the code fragment: public static void main(Stirng[] args) { int x = 353; int j = x++; switch (j) { case 317: case 353: case 367: System.out.println("Is a prime number."); case 353: case 363: System.out.println("Is a palindrome."); break; default: System.out.println("Invalid value."); } } What is the result?

Options

  • ACompilation fails
  • BIs a prime number.
  • CIs a palindrome.
  • DIs a prime number.
  • EInvalid value.

Explanation

Exception in thread "main" java.lang.Error: Unresolved compilation problems:

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice
Given the code fragment: public static void main(Stirng args) {... | 1Z0-803 Q#141 Answer | NerdExam