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 is the base class for all swing components?
What is the function of internal frame in swing?
What method is used to specify a container's layout?
What is the what is the difference between invokeandwait() and invokelater()? ?
Why is model-view-controller architecture used in swing?
What is the role of java swing?
What are the advantage of swing over awt?
What is the difference between swing and applet?
What is content pane in swing?
What are heavy weight components ?
What is jfc? What are the features of jfc?
What is the use of jfc in java swing?
What are the components of swing?
Is swing better than awt?
Which method of the Component class is used to set the position and size of a component?