Main Method
- The first static method you learned about in Java is the
mainmethod - The
mainmethod is the entry point for a Java executable.- When you run a Java program it looks for and runs the
mainmethod - If no
mainmethod exists, nothing happens.
- When you run a Java program it looks for and runs the
- The
mainmethod is usually placed in a separate class by itself often called adriverclass (though does not need to be namedDriver).
public class Driver {
public static void main(String args[]) {
//Start of program
}
}














