can we create a object in static block
class A
{
static {
A a=new A();
}
}
Answer Posted / naresh tuhania
Yes we can do this . Because we can create an object at
runtime and static block is also execute when a class is
loaded by the class loader at runtime
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the various components of swing?
Which method is used for setting security in applets?
What are the benefits of swing over awt?
How to print in java swing application?
Hello Everyone.. I m trying to develop a java swing application where i can display a doc file Jeditorpane or Jtextpane.
What are differences between swing and awt?
What is the role of java swing?
What is swing and awt in java?
What class is at the top of the AWT event hierarchy?
What are the advantage of swing over awt?
What is the use of swing in java?
What are heavy weight components ?
What is frame in java swing?
How is multi-threading gets implemented using swing?
What is the mean of swing?