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

Answer Posted / praveen

PUBLIC: in this we should access the function inside d class
or outside d class

STATIC:if any method is invoking obj is must.but using
static no obj is necessary.

VOID: void means nothig.in main method we should not declare
any value. so void is return type.

STRING[]ARGS:in java every input consider as a string

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is arrays sort in java?

576


Java is Pass by Value or Pass by Reference?

622


Why we cannot override static method?

561


Name component subclasses that support painting in java programming?

639


What is the purpose of final keyword and when to use it?

528






What is defined as false sharing in the context of multithreading?

507


what is meant by Byte code concept in Java?

600


What is the difference between checked exception and unchecked exception?

530


What is the difference between the ">>" and " >>>" operators in java?

509


Can you make a constructor final?

582


How many digits is int32?

538


Why Java doesn’t support multiple inheritance?

637


What an i/o filter?

567


What is garbage collection? Can it be forced to run?

543


How java enabled high performance?

587