answersLogoWhite

0

Why main is used in java?

User Avatar

Anonymous

15y ago
Updated: 8/17/2019

In java need main() method. without main() in java we won't run the java programe

main() signals the entry point to the program - it tells the Java Virtual Machine which is the first program that should be executed.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Which api used in java?

The Java API is the API for the main Java Library.


Why are you used new operator in main method in java?

new is used for memory allocation in java which on later automatically deallocated by garbage collector.


What is a getContentPane method in Java?

The getContentPane() method is used to get the main component in a Java Swing JFrame. It is usually a JPanel.


Who invoke main function in java?

The Java Runtime Environment invokes main methods.


How do you call main class with in main class in java?

We can't call a class. We always call a method in java.


Why do you have to install java to play RuneScape?

because runescape main engine is java


When 'public static void main' used in java?

That is the signature for the main program. The main program is the starting point, where execution starts - from there, other programs may be invoked.


What are the main cities in java?

supre


What is the main difference between UNIX and JAVA?

Unix is an operating system, Java is a language.


What are the main landforms of Jakarta?

Jakarta is in the island of Java. Java is part of Indonesia archipelago


How do you print message before main in java?

You cannot do that. The main method of a java class is the point where the execution begins. You can print messages only after a main method is invoked.


What will happen if a Java Class has no Main Method?

Nothing will happen. There is no restriction that every Java class must have a main method. The only program is that, this class cannot be executed as a standalone java program.