nerdexam
Oracle

1Z0-851 · Question #163

Given: 11. String test = "a1b2c3"; 12. String[] tokens = test.split("\\d"); 13. for(String s: tokens) System.out.print(s + " "); What is the result?

The correct answer is A. a b c. See the full explanation below for the reasoning.

Question

Given: 11. String test = "a1b2c3"; 12. String[] tokens = test.split("\d"); 13. for(String s: tokens) System.out.print(s + " "); What is the result?

Options

  • Aa b c
  • B1 2 3
  • Ca1b2c3
  • Da1 b2 c3
  • ECompilation fails.
  • FThe code runs with no output.
  • GAn exception is thrown at runtime.

How the community answered

(26 responses)
  • A
    77% (20)
  • B
    4% (1)
  • C
    8% (2)
  • F
    12% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice