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 do we need hashset in java?
What is meant by inheritance and what are its advantages?
Explain about sets?
What is stream api in java8?
Explain java heap space and garbage collection?
Is null or empty java?
Which sort is best in java?
What is arraylist class in java?
What is tree node in java?
What is ph and buffers?
how to write a server program and sending the mails to the server using smtp protocol please help me
What are the six ways to use this keyword?
Explain java thread life cycle.
what r advatages of websphere? & how to deploy?
What are the different data types in java?