[Solved] Java class without main method will run?
Q1. can we compile this java class? Note we don’t have a main method in this class. Yes, that class should compile. There’s no requirement that says you need a main method in every class for it to compile. (Most of your classes won’t have their own main method.) Q2. Is there any way we … Read more