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
How much ram can a 64 bit processor theoretically?
What is casting in java programming?
If goto and const is reserve words than why it is not work in java?
What is default constructors?
What is the function of static in java?
Can an object subclass another object?
What is palindrome in java?
what is meant by abstract class?
What is the definition of tree ?
What are memory tables?
Define linked list and its features with signature?
What is a priority queue java?
How do you override a method?
How do you sort arrays in java?
Define how can we find the actual size of an object on the heap?