Now I have this error:
Exception in thread \"main\" java.lang.ArrayIndexOutOfBoundsException: 4 at Lotto1.main(Lotto1.java:37)
Line 37: arr[count][0] =
You didn't put the right path into the FileReader only into File f, you can pass f into the Filereader instead of repeating the path:
File f = new File("D:\\database_lotto.txt"); [...] BufferedReader reader = new BufferedReader(new FileReader(f));