package MyFirstProject;
public class HelloWorld
{
public static void main(String args[]) throws Exception
{
System.out.println ("Hello world!");
System.in.read();
}
}
But I keep getting and error message that says:
"MyFirstProject.java": class HelloWorld is public, should be declared in a file named HelloWorld.java at line 3, column 1
Didn't I declare that HelloWorld is public when I said " public class HelloWorld"??? I've tried adding the .java extention in the code like in the error but didn't seem to help at all. Does anyone know what I'm doing wrong here?

New Topic/Question
Reply



MultiQuote



|