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
Is java se open source?
Why does java have two ways to create child threads? Which way is better?
What is the mapping mechanism used by java to identify IDL language?
Which java version is latest?
Can you explain the cs option of java interpreter?
What is the use of arrays tostring () in java?
Why do we use threads in java?
Why is a string immutable?
Explain java thread life cycle.
Can java cast null?
Explain naming conventions for packages?
What is style and indentation?
How do you sort a string in java?
What is the difference between state-based unit testing and interaction-based unit testing?
What is the difference between super class & sub class?