Why do we need main method to execute a java program?
Main method is auto called by JVM. It is the place, where JVM enters into the class. It is called before the class is instantiated by its constructor. There are below reasons on its signature.
1. Public access modifier: it is visible to outer environment called JVM.
2. Static non-access modifier: it is called before the class is instantiated, hence JVM use class name to call the main method.
3. Void return type: It return no value to JVM.
4. String array parameter: It takes command line arguments.
| Is This Answer Correct ? | 11 Yes | 1 No |
How does abstract modifier work?
My application URL : http://localhost:8080/Application/Login.jsp. When a user enter this url in IE then, how it get Login.JSP Page exactly? what are the processes will happen from when we submit the URL to get Login.jsp?
Can private class be inherited in java?
What is a Java Virtual Machine?
Explain the use of javap tool.
What are aggregate functions explain with examples?
Is char a data type in java?
How thread scheduler schedule the task?
Which of the following is not an isolation level in the JDBC
What java ide should I use?
what is difference between colection and collections?
25 Answers Amdocs, IBM, Infosys, Ipog Software, Polaris, Tech Mahindra,
What does it mean that strings are immutable?