In Java, what are public static void main string args?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
How many types of interfaces are there?
When does the compiler supply a default constructor for a class?
How to sort list of list in java?
Difference between predicate, supplier and consumer ?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
What does the exclamation mark mean in java?
i need source code for income tax program using java inheritance
Can you pass by reference in java?
What are the types of inner classes (non-static nested class) used in java?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
What is type conversion in java?
Difference between keyword and identifier.