If in a program multiple classes are declared as public then with which class name we will save it?And in case of interface with the interface name the file will be saved or with the name of the which contains public static void main?
In one program we can not make more than one public class or interface, There must be only one public class, and with that public class name file should be save.