I'm trying to read text from a file, copy it to another file and read it back. All I get is strange looking characters. I do not understand how the FileReader and Writer work. Can someone explain this to me please? In the books it says that FileReader and FileWriter reads and write characters but why does my output looks so strange?
FileReader fileReader = new FileReader(fileName1, StandardCharsets.UTF_8);
        FileWriter fileWriter = new FileWriter(fileName2, StandardCharsets.UTF_8);
        int count = 0;
        while (fileReader.ready()) {
            int a = fileReader.read();
            //step 5: The program must write to the second file all bytes from the first file with an even ordinal number (use FileWriter).
            //meaning that we write all chars that are in second, fourth, sixt etc place?

            if (count % 2 == 0) {
                //a is an int how to write an actual character to the file?

        //step 4: The file input stream (FileReader) must be closed.

        //step 6: close the filewriter

        FileReader fr = new FileReader(fileName2);
        while (fr.ready()) {
            int a = fr.read();
            //char b = (char) a;
            System.out.print((char) a);