Why this program giving me output instead of complie time error?
As per my knowledge we can declare ONLY ONE top level public class in a Java file. If we are trying to create more than one public class in a java file then we will definitely get a compile time error. But In this program i have created three public class but I'm not getting any error. I'm not getting why this happening in Sololearn. Because it's should be throwing an compile time error instead of output. https://code.sololearn.com/cGlCd8mvkfgH/?ref=app