here is my code and i have tokenized the data in my .txt file.I want to insert them into a database.
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.StringTokenizer;
public class test1 {
public static void main(String[] args) {
BufferedReader br = null;
try {
String sCurrentLine;
br = new BufferedReader(new FileReader("D:\\Warface Launcher\\eclipse is fk\\something\\src\\2.txt"));
while ((sCurrentLine = br.readLine()) != null) {
System.out.println(sCurrentLine);
StringTokenizer defaultTokenizer = new StringTokenizer(sCurrentLine);
while (defaultTokenizer.hasMoreTokens())
{
System.out.println(defaultTokenizer.nextToken());
}
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}
my current Output:`23 30 40 320 49 290 04 30 48 73 83
23
30
40
320
49
290
04
30
48
73
83