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 does a method signature consist of?
Why is it called a string?
What is meant by vector class, dictionary class, hash table class, and property class?
What is regex used for?
Can you give few examples of final classes defined in java api?
What are strings in physics?
What is a Transient Object?
What do you understand by casting in java language?
What is map and hashmap in java?
What is stringjoiner ?
What is deserialization?
How to reverse a string in java?
Why set is used in java?
Explain about the main() method in java?
Does list maintain insertion order java?