In Java why we write public static void main(String args[])
why not main()?

Answer Posted / ratna

As said by Prabhakant Prabhakar Rasal
if There are two main reasons to write string args[]
1. TO identify the program
2. To get command_line arguments

How does the string args[] helps in identifying the program ????

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does java have different data types for integers and floating-point values?

536


What is difference between printf and scanf?

523


what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread

489


Differentiate between the constructors and methods in java?

511


Differece between class and generic class?

567






Why to use nested classes in java?

589


What is static method with example?

620


Can It is possible to synchronize the constructor of a Java Class?

594


What do you mean by JVM?

591


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

3793


What is the importance of finally block in exception handling?

544


What are nested classes in java?

609


What is dynamic array in java?

528


What is incompatible types in java?

539


define the terminology association.

619