Oracle
1Z0-851 · Question #200
Given: String test = "a1b2c3"; String[] tokens = test.split("\\d"); 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: String test = "a1b2c3"; String[] tokens = test.split("\d"); 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
(48 responses)- A79% (38)
- B2% (1)
- C6% (3)
- D10% (5)
- E2% (1)
Community Discussion
No community discussion yet for this question.