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
How many threads does a core java have?
Is math class static in java?
What is the inheritance?
Which sorting is used in arrays sort in java?
What does bitwise or mean?
How to make object serializable in java?
Can a constructor have different name than a class name in java?
Why arraylist is used in java?
Difference between == and .equals() ?
Can we assign the reference to this variable?
What are the differences between string and stringbuffer?
How do you remove an object from an arraylist in java?
What are the restrictions imposed by a Security Manager on Applets?.
what is the constructor and how many types of constructors are used in java?
What is the difference between Array and Hash Table?