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
What are accessor methods in java?
How do you use compareto in java?
explain what is transient variable in java?
What is a nested class?
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
How do you override a method in java?
what is meant by HQL?
What is the benefit of inner / nested classes ?
Explain about the select method with an example?
What are different access specifiers in java? Explain
What are new features introduced with java 8 ?
What are the advantages of functions?
Can we compare two strings in java?
What is the scope or life time of instance variables?
What will happen if static modifier is removed from the signature of the main method?