In Java, what are public static void main string args?

Answers were Sorted based on User's Feedback



In Java, what are public static void main string args?..

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

In Java, what are public static void main string args?..

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

Post New Answer

More Core Java Interview Questions

How many types of interfaces are there?

0 Answers  


When does the compiler supply a default constructor for a class?

9 Answers   TCS,


How to sort list of list in java?

0 Answers  


Difference between predicate, supplier and consumer ?

0 Answers  


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

0 Answers  


What does the exclamation mark mean in java?

0 Answers  


i need source code for income tax program using java inheritance

1 Answers  


Can you pass by reference in java?

0 Answers  


What are the types of inner classes (non-static nested class) used in java?

0 Answers  


What is JDBC Driver interface?How can you retrieve data from the ResultSet

0 Answers   CTS,


What is type conversion in java?

0 Answers  


Difference between keyword and identifier.

0 Answers   TCS,


Categories