Possible Duplicate:
Causes of 'java.lang.NoSuchMethodError: main Exception in thread “main”'
I am using Eclipse. I deleted everything and left the main function – nothing is working. Can somebody pls help?
package good;
import java.io.*;
public class FiFo {
public static void main()
{
System.out.println("here");
}
}
class FileReader {
public FileReader(String fileName)
{
try {
FileInputStream fstream = new FileInputStream(fileName);
BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
}
catch (FileNotFoundException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
The main function should have a signature like:
You’ve missed out the String array. When you run the program it expects to find a method with this signature, not the empty arg list you have in your sample code.