when everything can be done by static block then why do we
use main method?.
Answer Posted / guest
the main block is declared as static sothat the java
interpreter could use it without instantiating it,but if we
declare everything as static there is no meaning of a class
and specifying instance variables and methods belong to
that specific class only.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the meaning of find and replace?
Does windows 10 need java?
Explain thread in java?
what is difference betweem home interface and remote interface?
What are the basic control structures?
Is nullpointerexception checked or unchecked?
What is the difference between private & public & friendly classes?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
What is immutable in java?
How does hashset work in java?
Difference between operator overloading and function overloading
Why vector class is used?
What is xslt in java?
Can we define static methods inside interface?
Explain a situation where finally block will not be executed?