a main method is just like any other method. if you want it to be the one that runs when you type "java MyClass", then it has to be "public static void main(
String [] args)".
what it does is up to you. You could write a main() method that is completely unrelated to everything else in the file.
What do you WANT the main method to do, and what EXACT errors are you getting? if you post them, folks may be able to guide you.
Note that a common idiom for a main method is something like this:
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors