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  >>  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 static and non-static 
variables?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between static and non-static variables?
Answer
# 1
Static variables:
     There is only one copy of static variable and even 
when the class is instatiated, the value remains the same.

Non-static variables:
    Every time the class is instatiated, the objest has 
their own copy of these variables.
 
Is This Answer Correct ?    15 Yes 1 No
Sathya
 
  Re: What is the difference between static and non-static variables?
Answer
# 2
static variables are class variables and the values remains 
same fr the whole class
nonstatic variables are of two kinds
global variables:are the variables which defines variables 
which can be accesible over the whole class
local variables:the scope of local variables is with tin 
the method only
 
Is This Answer Correct ?    9 Yes 1 No
Ravikiran
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Inorder to specify a container?s layout, which method is used?  1
What are the names of interfaces that doesn't consists of method/s ?  3
we know that every java prog must follows OOPS Principles. Anybody can answer, HOW THE FOLLOWING PROGRAM FOLLOWS OOPS CONCEPTS i.e, Inheritance,Polymarphism,Encapsulation? class a{ public static void main(String args[]){ System.out.println("Hello World"); } }  3
What are different type of access modifiers?  3
How many bits are allocated to represent character of character sets - Unicode, ASCII, UTF-16, UTF-8?  1
what is servlet filter?  1
What is the purpose of a statement block?  1
How to call a Stored Procedure from JDBC? Satyam2
Relationship between an event-listener interface and an event-adapter class?  1
What is Runtime class and its purpose?  2
How are this and super used?  6
What is the difference between overloading and overriding a function? Infosys7
Does a class inherit the constructor of its super class?if it does, how can you hide that constructor? if it doesnot how can you call it from the sub class?  1
What is multiple inheritance & can we implement it in java? Satyam4
Explain the difference between the Boolean & operator and the && operator?  1
What are null interfaces? Give some examples?  2
What is an Exception ?  6
what is difference between global methods and local methods?  1
what is the difference between java and j2ee... is that can i work j2ee on net beans IDE 6.0  2
Need 2+ yrs experienced java techinical question papaer for company Iflex  1
 
For more Core Java 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