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 are swings?
Explain how to render an html page using only swing.
Which layout does swing use by default?
Which package is needed for swing components?
What is the use of double buffering in swings?
Is swing better than awt?
What is the difference between swing and awt?
What are the differences between Swing and AWT?
What are the components of java swing?
What is java swing components?
Why are swing components called lightweight?
What are swing controls?
What is import javax swing * used for?
Can a class be it?s own event handler? Explain how to implement this?