The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2002

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

FileReader error message

Posted by Markku Putkivaara on January 15, 2002 at 6:04 AM

Why this is not working? Environment jdk1.2.2.
Allways recieving an error message "Wrong number of arguments in constructor. Trying to read from a file.

java.io.*;
//import java.util.*;
class Lue {
public static void main(String [] argv ) throws IOException {
BufferedReader in;
int hlo;
String etunimi, sukunimi;

in = new BufferedReader (new FileReader ("c:\\markku"));
//error arrow showing here for new


hlo=Integer.parseInt(in.readLine());
etunimi=in.readLine();
sukunimi=in.readLine();
in.close();

System.out.println("tunnus :"+hlo);
System.out.println("etunimi :"+etunimi);
System.out.println("sukunim :"+sukunimi);
}
}




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us