import java.io.*; import java.util.StringTokenizer; class TestSplit { public static void main(String[] args) throws Exception { BufferedReader r = new BufferedReader( new FileReader("info.txt")); StringTokenizer t; t = new StringTokenizer(r.readLine()," "); while(t.hasMoreTokens()) { System.out.println(t.nextToken()); } } }