I want to split a text file that has all connected words "ABCDEFGHIJKLMNOPQRSTUVWXYZ" I want my output to print:
ABC
DEF
GHI
JKL
I tried:
String text = StdIn.readAll();
String parts [] = text.split("\\s ",3);
for(String a: parts)
System.out.println(a);