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
Explain about anonymous inner classes ?
What is the difference between the ">>" and " >>>" operators in java?
Which category the java thread do fall in?
Can we sort hashmap in java?
How do you add spaces in java?
What are the advantages of compiled language?
What is super in java?
Which is the best approach for creating thread ?
When do we use hashset over treeset?
Can you declare a private method as static?
What is the base class for error and exception?
Why multiple inheritance is not supported by java?
What is an array in java?
Does collectionutils isempty check for null?
When is the finally clause of a try-catch-finally statement executed?