split()

split() — Divides the string into an array of substrings based on a specified delimiter.

String[] split(String regex)
String sentence = "Java is powerful";
String[] words = sentence.split(" "); 
// Outputs: ["Java", "is", "powerful"]

Related concepts

split()

split() — Structure map

Clickable & Draggable!

split() — Related pages: