|FileReader() constructor issue in Eclipse?? [message #210374]
||Fri, 11 May 2007 12:29
Originally posted by: stedav.stevedavies.gmail.com|
I'm trying to create a basic File io reader to read from a text file in
Eclipse. I start with the usual try/catch block for IOExceptions. here
is an example of my code:
FileReader fr = new FileReader("lorum.txt") //a simple txt file I have
However in Eclipse at this stage I get a red underline error saying
"the constructor FileReader(String) is undefined."
I have tried also creating a new File Object (File myFile = new
File("lorum.txt"); and then chaining it to a FileReader but still I have
no success. In the Java API it says FileReader class takes a String
constructor argument (String) which is what I have tried in the first
Is this an issue with my Code or a problem n Eclipse??
Powered by FUDForum
. Page generated in 0.01726 seconds