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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 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
what is the difference between statis block and static 
variable
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the difference between statis block and static variable
Answer
# 1
Static block is the block which is executed first in the 
program. Static variable is the common variable which is 
shared by all the objects. Static variable is not specific 
to any object.
 
Is This Answer Correct ?    1 Yes 0 No
Ramakrishna
 
  Re: what is the difference between statis block and static variable
Answer
# 2
i wolud like a new point to the above answer.
first the static varibles are inistalized then the static 
bloks are executed.
 
Is This Answer Correct ?    0 Yes 0 No
Narasimha
 
 
 
  Re: what is the difference between statis block and static variable
Answer
# 3
staticblock,static variables,static method are executed 
before creating an object to be created to class.i think 
there is no difference between them.
 
Is This Answer Correct ?    0 Yes 0 No
Suresh.m
 
  Re: what is the difference between statis block and static variable
Answer
# 4
ryryt
 
Is This Answer Correct ?    0 Yes 1 No
Ryry
 
  Re: what is the difference between statis block and static variable
Answer
# 5
static block is used to initialize the variables during the 
Jvm start up.
static variable is used to declare the class level 
variables whose value remains ame for the whole class.
 
Is This Answer Correct ?    0 Yes 0 No
Ravikiran
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is adapter class?  2
transaction attributes ?  2
what is the difference between AWT and SWING what is the advantage of using swing?  2
Write a program to create a binary Tree ?  1
what us Dyna action form? Aithent-Technologies2
What is Collections API?  1
what is wrapper class and its uses?  2
What are Inner classes?  2
What is an exception?  3
What is the difference between C++ & Java? Syntel10
What will happens if you opened Internet Explorer 4 times?  2
what is web.xml?and its use? CTS5
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006. EDS1
what is mean by String and StringBuffer? What is mean by Methooverriding and Overloading? Satyam3
How to decrease number of hashings in has  1
Explain the difference between the Boolean & operator and the && operator?  1
when we write class.forName("any one class"); what happens actually?what it will return?explain stepwise?  3
What is a void return type?  2
Is 'null' a keyword?  2
Explain difference between final, finally and finalize?  2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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