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
Which types of components are used in designing swing based gui?
How is multi-threading gets implemented using swing?
What are the different types of layout managers used in swing?
What are the swing components?
What is the use of java swing?
What are swings?
What is swing in java javatpoint?
What is jpanel in java swing with example?
Why does JComponent have add() and remove() methods but Component does not?
Write a program to include the internal frame in swing.
Why are swing components called lightweight?
What is swing in java with example?
What is import javax swing?
When we should go for codebase in applet?
Is java swing a framework?