Help with string | Sololearn: Learn to code for FREE!
+ 1

Help with string

If the string is String name="My name is Altina"; How can I output only "is Altina"

26th Jan 2019, 3:27 PM
Altina
Altina - avatar
2 Answers
26th Jan 2019, 3:46 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 2
You could use the String.split () method. String [] split = name.split (" "); split = [My, name, is, Altina]
26th Jan 2019, 3:51 PM
Denise Roßberg
Denise Roßberg - avatar