can we create a object in static block
class A
{
static {
A a=new A();
}
}
Answer Posted / anjani kumar jha
Yes We can do..........................there is no problem
static
{
FileSize fz=new FileSize();
System.out.println(fz);
}
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Why does JComponent have add() and remove() methods but Component does not?
What class is at the top of the AWT event hierarchy?
What is swing and awt in java?
How to print in java swing application?
Explain the difference between jfc & wfc.
Is swing still used in java?
What is the purpose of action interface in swing?
What is the design pattern that java uses for all swing components ?
What is import javax swing * used for?
What are the two key features of swing?
Explain how to render an html page using only swing.
What are swing controls?
Is swing still used?
What is the difference between invokeAndWait() and invokeLater()?
What are heavy weight components ?