for (line = lnr.readLine(); line!=null; line = lnr.readLine()){ String account[] = line.split(" "); //print whatever you want//and do whatever you want with the elements://account[0], account[1], account[2], account[3], account[4] }