what is the difference between static block and static
method
Answer Posted / khasim
static block will be called at the time of loading the
class.it can be called once.developer can not be called
expecitly
static method will called at the time of loading the
class.here we can call expecitly by using there classname
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
a thread is runnable, how does that work? : Java thread
Explain the difference between treeset and treemap in java?
What are the two types of exceptions in java? Which are the differences between them?
Can static methods access instance variables in java?
Can a vector contain heterogenous objects?
How to write custom exception in java?
Why java is considered as platform independent?
Is 9 a prime number?
Define how destructors are defined in java?
What an i/o filter?
What is identifier with example?
Can you explain the final method modifier?
What is class array in java?
In how many ways we can create threads in java?