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:
Post Comments (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...
-
The Type Promotion Rules :- Java defines several type promotion rules that apply to expressions. They are as follows : all byt...
-
Java Environment Java environment includes a number of development tools , classes and methods. The development tools are part ...
-
JAVA program to input and print n number using array :- PROGRAM :- import java.io.*; class Clsarray { public static void main(St...
No comments:
Post a Comment