Why do we need public static void main(String args[])
method in Java...?
Answer / shadow
We need
• public: The method can be accessed outside the
class / package
• static: You need not have an instance of the class
to access the method
• void: Your application need not return a value, as
the JVM launcher would return the value when it exits
• main(): This is the entry point for the application
If the main() was not static, you would require an instance
of the class in order to execute the method.
....!
$HADOW
Is This Answer Correct ? | 14 Yes | 0 No |
what is java bean?where can we use it?
Can a class be private or protected in java?
What is method Overloading in the perspective of OOPS?
Can we make constructors static?
what is nested class in java?
How do you write a scanner class in java?
What causes memory leaks in java?
I need some details about an employee. i have only the employee id in my presentation layer(JSP).I entered that ID and click "Show Details" Button. Question is how the JSP pass that id to Controller layer and DAO and what mechanism we are using to retrive data from DB and how the data passed to JSP as a Output. Please explain in detail.
what is marker interface ? what is the necessity of it?
What is the ==?
What is the Concept of Encapsulation in OOPS
why not override thread to make a runnable? : Java thread