In Java, what are public static void main string args?

Answer Posted / glibwaresoftsolutions

The access modifier "public" is used to define who has access to this method. Any class can use this method as well.
• The Java keyword "static" indicates when something is class-based. Java makes main() static so that it can be accessed without requiring the creation of a class instance. Since the JVM calls main() before creating any objects, the compiler will raise an error if main is not set to static. It can only use the class to directly call static methods.
• The method that defines the method's return type is called Void. There is no value returned by that procedure.

• Main is the name of the method that the JVM looks for when an application (with a certain signature only) starts. It is

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why java is called not pure object oriented language?

814


What are abstract methods in java?

879


What is the use of :: in java?

774


What string is utf8?

737


If system.exit (0); is written at the end of the try block, will the finally block still execute?

827


What is a package in java? List down various advantages of packages.

978


Explain the term virtual machine?

806


How do I print a “?

769


Tell us something about set interface.

765


What are different data structures in java?

723


What is string in java is it a data type?

738


Is java still necessary?

836


Is static variable stored in heap?

700


Can we catch more than one exception in single catch block?

841


What are different types of expressions?

753