Skip to content
UPEEC

Strings in Java

Immutable sequences of characters with many methods.

Beginner
Comments 0

s.length(), s.charAt(i), s.substring(1, 4), s.split(","), s.strip(), """text blocks""" (Java 15+). Compare with equals, never ==.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.