What does public static void main(string[]) mean?



What does public static void main(string[]) mean?..

Answer / Chakresh Kumar

public static void main(String[] args) is the entry point of a Java program. The keyword 'public' makes the method accessible from any other class, 'static' means that it can be called without creating an object of the class, and 'void' indicates that the method does not return a value. The 'String[] args' part signifies that the main method accepts a string array as its argument, which contains command line arguments passed to the program.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Java Related AllOther Interview Questions

what is constructer?what are the type of constructer with example.

6 Answers  


Write a class which checks whether a given number is prime or not. Write another class to implement the behavior of previous class and print the series of twin prime number upto a given range.

1 Answers  


What is jersey in java?

1 Answers  


What is the singleton class in java?

3 Answers  


Can the main method be declared final?

1 Answers  


Java prints out a ton of digits when I system.out.println() a double. How can I format it so it displays only 3 digits after the decimal place?

1 Answers  


What is a cookie in java?

1 Answers  


what are the steps in JDBC connectivity..???

1 Answers   IBM, SoftCom, TCS,


What is the use of servlet in java?

1 Answers  


What is a delimiter in java?

1 Answers  


How long can a lambda function run?

1 Answers  


write a code in jsp to swap two numbers?

7 Answers   Wipro,


Categories