Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Java
/
Strings
For String text = "A🚗", which statement is correct?
from Strings
Java 25 LTS
beginner
1 min
For String text = "A🚗", which statement is correct?
text.length() is 3 and its code-point count is 2.
text.length() is 2 because Java indexes Unicode code points.
text.charAt(1) returns the complete car emoji.
text.substring(0, 2) is guaranteed to preserve complete code points.
Check
Ask AI about this kata
Report an error
previous kata
A persisted protocol key must use locale-neutral uppercase. Which expression states that …
Quiz
next kata
What does this program print?
Predict the output
A new version is available
Reload