In Java, what are public static void main string args?
Answer Posted / nashiinformaticssolutions
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
Why can't we override private static methods?
What do you understand by the bean persistent property?
How are the elements of a gridbaglayout organized?
What are format specifiers in java?
When do we use synchronized methods in java?
What is contract between hashcode and equal method?
What do you mean by constant time complexity?
Which variable is the independent variable?
How does remove work in java?
Explain what pure virtual function is?
What is the best way to findout the time/memory consuming process?
Can a class be private or protected in java?
What one should take care of, while serializing the object?
Is space a char?
Why do we need autoboxing in java?