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
What is the size of integer?
What about abstract classes in java?
What is difference between Heap and Stack Memory?
What are measurable parameters?
How do you override a private method in java?
Do we need to manually write Copy Constructor?
Which data type is class in java?
How do you insert a line break?
What is a copy constructor in java?
What is variable and rules of variable?
Explain importance of finally block in java?
Which is easier .net or java?
explain the difference between jdk and jvm?
Is there any difference between synchronized methods and synchronized statements?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?