That normally suggests you have tried to initialise using parameters that don't map to a constructor. However, I had a quick look and it seems a FileReader object can be created with a String parameter specifying a filename.
Do you have a more precise error message and/or some code?
It's a namespace collision, it's generally a bad idea to name your classes the same as the common Java libraries but you can get around it by explicitly specifying the namespace such as:
BufferedReader bufferedreader = new BufferedReader(new java.io.FileReader("items.txt"));
You are explicitly specifying that you want to use the FileReader from the java.io package. Java will use the 'closest' definition of a type so if you import a type that is defined in the class, the one in the class will have priority. Any good IDE such as Eclipse warns you when this happens but it's one of those problems you can spend hours trying to figure out if you don't notice it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.