1. Computing
Send to a Friend via Email

Main Class

By

Definition:

A main class is a class that contains a main method. This class acts as the entry point for a Java application (i.e., its main method will be where the Java code begins its execution). A main class can have any name although typically it will just be called "Main".

Examples:

In the below example, the "TimerApplication" class is a main class because it has a main method:

public class TimerApplication {

  public static void main(String[] args) {

  }

}

Glossary:

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

  1. About.com
  2. Computing
  3. Java
  4. Java Glossary
  5. M
  6. Definition for the Java Term: Main Class

©2014 About.com. All rights reserved.