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


Please Help Members By Posting Answers For Below Questions

Is class forname reflection?

738


Can a serialized object be transferred via network?

721


What is the most important feature of java? What is an interface?

779


Is char a data type in java?

767


Why are functions called methods in java?

776


What is io stream in java?

752


Can main() method in java can return any data?

916


What is the parse method in java?

811


What does || mean in vectors?

719


Does java runtime require a license?

792


What is difference between module and function?

785


What is the difference between static and global variables and also define what are volatile variables?

825


Which access specifier can be used with class ?

739


What is the difference between instanceof and isinstance?

778


What is string substring?

826