main
method should exist for your application to run. Java applications need it to know where to begin executing the program.
Put the method in a class of your choice, and then right click file and select 'Run file`.
public static void main(String[] args)
{
// your code here
}