ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Swing
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
can we create a object in static block
class A
{
static {
A a=new A();
}
}
 Question Submitted By :: Rajender
I also faced this Question!!     Rank Answer Posted By  
 
  Re: can we create a object in static block class A { static { A a=new A(); } }
Answer
# 1
Yes, we can create a object in static block
 
Is This Answer Correct ?    1 Yes 0 No
Chellammal
 
  Re: can we create a object in static block class A { static { A a=new A(); } }
Answer
# 2
We can create object because static block is a executable 
block and we don't want any Instance to call. It will be 
called before executing or calling the main thread 
But here we will get object and exception 
//Exception in thread "main" java.lang.NoSuchMethodError: 
main
 
Is This Answer Correct ?    1 Yes 1 No
Karthik
 
 
 

 
 
 
Other Swing Interview Questions
 
  Question Asked @ Answers
 
How can you draw using Swing components?  1
how can u handle runtime exceptions in java plz explain with examples briefly? Fujitsu2
what do u mean by GUI framework  1
How are Swing and AWT be differentiated? Wipro2
What is meant by JFC? Mindlogicx5
What are the benefits of using Swing over AWT?  1
What is the use of JTree?  2
how to give transparency for JComboBox,JListBox and JTable  1
what are the root classes of all classes?  4
Difference between AWT and Swing compenents?  1
What does x mean in javax.swing?  3
what is difference between checked and unchecked exception plz explain examples ? Fujitsu2
What is the base class for all of swing components?  3
What is the difference between AWT & Swing? Deshaw6
Explain the differences between an applet and a Japplet?  1
What is JTable and what is its purpose?  3
how to give transparency to JComboBox,JList and JTable Ness-Technologies1
What is meant by Swing?  4
What is the default look and feel of a Swing Component?  1
How to merging the particular cells in JTable  1
 
For more Swing Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com