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
How do you use spaces in java?
Why parsing is done?
How big is a boolean?
How do you sort in descending order in java using collections sort?
What do you mean by constant time complexity?
List down the methods and interfaces of collection class in java.
Explain about abstract classes in java?
What is lazy initialization in java?
what is nested class in java?
Can a static member function access member variable of an object?
Can we use catch statement for checked exceptions?
How do you calculate roots in java?
What does the three dot emoji mean?
Why do we use regex?
What is a priority queue java?