I am looking to parse a string by ". ", but it seems to register the period as a backspace and then just parse by the space. Why is this happening and what can I do to fix it?
String x = "Hi. My name is Jeffrey. I like sports.";
for (String t : x.split(". "))
System.out.println(t);
This yields:
M
nam
i
Jeffrey
(blank line)
lik
sports.