This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.