Need to use public,static keywords in main function?

Answer Posted / anjani kumar jha

public is used because from anywhere u r able to call ur
main method

static-static is the entry point of main function which is
executing by jvm(at run time) in other word signature of
the main function.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can an integer be null java?

559


Difference between this() and super() ?

582


What is difference between class and object in java?

531


What is the Difference between Final Class && Abstract Class?

618


What is main function purpose?

524






What are the object and class classes used for?

564


What is backdrop?

596


What is difference between throw and throws ?

603


State the difference between strings and arrays.

603


What is meant by the value of a variable?

462


Can singleton class be serialized?

516


How many bits are in a sentence?

586


How will you invoke any external process in java?

604


Explain about serializable interface in java?

586


Is java code slower than native code?

564