Java Professional — Hard
Key points
- `chars()` returns UTF-16 code units, splitting supplementary characters
- `codePoints()` returns Unicode code points, handling supplementary characters correctly
- Supplementary characters are not always split into surrogates
- `codePoints()` is not deprecated in favor of `chars()`
- `chars()` does not handle supplementary characters correctly
Ready to go further?
Related questions
