read csv java

Java
FileReader from = new FileReader("data.txt");
Scanner source = new Scanner(from);
...
int count = source.nextInt();
String str = source.next();
String wholeLine = source.nextLine();
...
from.close();
Source

Also in Java: