If the message doesn't make sense after looking (carefully) at your code, then I suggest you look (carefully) at every working example in your textbook, class notes, on-line tutorial or whatever material you are learning from.
Don't they all look kind of like this?
// May have a package statement
// May have one or more import statements
public class Whatever {
// May have various kinds of variables and/or methods for the class
public static void main(String [] args) {
// Stuff here that will be executed
} // End of main
// May have various kinds of variables and/or methods for the class
} // End of class definition
Bottom line: The
main() thingie is a method of a public class, and, therefore, is defined totally within the class.
Cheers!
Z