what is the difference between static block and static
method
Answer Posted / himanshu kumar upadhyay
Static block is executed when the class which contain static
block is loaded in to memory and static method is executed
when it is called. Mostly static block is used for
Initialization of static members.
Is This Answer Correct ? | 17 Yes | 2 No |
Post New Answer View All Answers
What is string substring?
What is reverse function?
What access modifiers can be used for class ?
Differentiate between run time error and syntax error.
what is interface in java? Explain
How do you replace all in word?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
What is purpose of applet programming?
What is the maximum size of hashmap in java?
What is compiler and what its output.
What is JVM and is it platform independent?
Which is easier .net or java?
What is default locale java?
Can we define private and protected modifiers for variables in interfaces?
What is proper subset?