my program should read an entire file, it works, but has some weird characters at the start when I output it to the console:
try {
String name = null;
JFileChooser fc = new JFileChooser();
int approve = fc.showOpenDialog(null);
if (approve == JFileChooser.APPROVE_OPTION) {
name = fc.getSelectedFile().getAbsolutePath().toString();
}
File file = new File(name);
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
StringBuilder sb = new StringBuilder();
String data;
while ((data = br.readLine()) != null) {
sb.append(data).append(" ");
}
br.close();
String readFile = sb.toString();
System.out.println(readFile);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Error occured", "Error", JOptionPane.ERROR_MESSAGE);
}
The console output looks like this:
test 01.01.2018 tets test 12.03.2019
Now in my file (html file) I selected, there arent the characters 
so where do they come from?