Which file name should be used to save the below Java program?

There are 3 classes exist in below program and each class contains main method of its own. 

class A 
{
    public static void main(String [] args)
    {
    }
}

public class B 
{ 
    public  static void main(String [] args)
    {
    }
}

class C 
{
    public  static void main(String [] args)
    {
    }
}

The above program should be saved as B.java otherwise we will get a compile-time error.  Class B is declared as a public that's why we can only save the above program as B.java.