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 are the two types of java programming?
How does queue work in java?
What are the features in java?
Can an integer be null java?
What is boolean example?
What is files manifesting?
What are wrapper classes in java?
What is final keyword?
What is string value?
What is the difference between post and put?
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
How to invoke external process in java.
What are green threads in java?
What ide should I use for java?
What is a instance variable in java?