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 integer size in java?
What is the indent key?
What are the two parts of a conditional statement?
Is array size fixed in java?
What do you mean Abstraction in java?
Is java type safe?
What are the different tags provided in jstl?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
why doesn't java run on all platforms?
What is boolean false?
Can we start a thread twice in java?
Is there any sort function in java?
Why does java not support pointers?
What are the types of exceptions?
What is the parse method in java?