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

What are accessor methods in java?

772


How do you use compareto in java?

758


explain what is transient variable in java?

889


What is a nested class?

843


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

749


How do you override a method in java?

765


what is meant by HQL?

851


What is the benefit of inner / nested classes ?

743


Explain about the select method with an example?

853


What are different access specifiers in java? Explain

850


What are new features introduced with java 8 ?

753


What are the advantages of functions?

722


Can we compare two strings in java?

778


What is the scope or life time of instance variables?

893


What will happen if static modifier is removed from the signature of the main method?

746