what is the difference between static block and static
method
Answer Posted / ravikiran
static block is used to initialize the variables during the
JVM startup.
static methods are getting called with out creation of any
instance.
| Is This Answer Correct ? | 34 Yes | 6 No |
Post New Answer View All Answers
What type of variable is gender?
What are user defined exceptions?
Can you pass functions in java?
Why a dead thread occurs?
What is considered an anti pattern?
How do you use nextline in java?
Can we access instance variables within static methods ?
write a program that list all permutations of ABCDEF in which A appears before B?
What is this keyword used for?
What is use of super keyword?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What is the purpose of assert keyword used in jdk1.4.x?
What is difference between throw and throws ?
What are the differences between processes and threads?
How to make a class or a bean serializable?