In Java why we write public static void main(String args[])
why not main()?
Answer Posted / kanchan bangar
In java if we are not writting public static void main
(String args[]) then program is only compield not run
that's why it must write because compiler in java always
look the main function and when compiler always calls the
main class is loaded in frist time call for that static
keyword is used and public is for access everything means
methods and member variabls of any pakage and classes or in
super class and meand it does not return any value.
| Is This Answer Correct ? | 18 Yes | 57 No |
Post New Answer View All Answers
What is the common usage of serialization?
What method is used to specify a container's layout in java programming?
Can a class have multiple subclasses?
What are some examples of variable costs?
What is a control variable example?
What does .equals do in java?
What is a variable in java?
Why is the singleton pattern considered to be an anti pattern?
What is == and === in javascript?
How many java versions are there?
What is the purpose of default constructor?
What do you understand by weak reference?
Why convert an applet to an application?
What are the methods used to implement for the key object in the hash map?
how would you implement a thread pool? : Java thread