Showing posts with label Can an applicatoin have multiple classes having main method in same JAVA file ?. Show all posts
Showing posts with label Can an applicatoin have multiple classes having main method in same JAVA file ?. Show all posts
Sunday, 1 November 2020
Can an applicatoin have multiple classes having main method in same JAVA file ?
Yes it is possible . While starting the application we mention the class name to be run . The JVM will look for the Main method only in the class whosw name we have mentioned . Here there is not conflict amongst the multiple classes having main ( ) method.
2. Give the name of top class of all classes in java and the top package which is the default package.
Top package which is default package in java .lang .package.
Subscribe to:
Posts (Atom)
Student Marks Calculation app using java
import javax.swing. *; import java.awt.event.ActionEvent ; import java.awt.event.ActionListener ; public class Student { private J...