I managed to get the stuff from my TextArea into a text file now I would like to open the same file using the FileReader and load it into the TextArea. Yet when I try I get a compilation error. Incompatible types. The complete code is below and it happens in the Open class What is it I am doing wrong again?
"read" returns int (not char, so that it can hold either a character or -1 to indicate EOF.) Trying to assign this int to "inhalt", which is a String, gives the incompatible type error. There are a number of ways to do this; probably what you want to do is use something like
This reads in a chunk of characters at a time rather than just one, so it's far more efficient.