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                      
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 are field variable and local variable?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are field variable and local variable?
Answer
# 1
Variables declared outside any method/constructor but inside
the class block, is a field variable.

Variables that are declared within a method or a specific
block of statements are local variables.

Local variables are kept alive as long as the execution is
within the block they're defined in. Once the block is
exited, the local variables can no more be used.

Field variables have longer life than local variables in
that they can live as long as the instance they belong to is
active.
 
Is This Answer Correct ?    9 Yes 0 No
Ranganathkini
 
  Re: What are field variable and local variable?
Answer
# 2
field variable is the one which can have different access
local variable access restict to method only
 
Is This Answer Correct ?    3 Yes 1 No
Ravikiran(aptech Mumbai)
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is Dictionary? and what purpose it is used for?  2
What is Vector?Can you elaborate how Vector is Thread safe?  3
what is the use of private constructor in core java? Satyam3
What is Connection pooling? Explain Pros and Cons?  1
what is difference between abstract and interface? can i give real time example for the two topics?  6
What is synchronization? How it can be achieved?  2
Name the methods that used to get and set the text label displayed by a Buttonobject?  1
Can you make an instance of an abstract class? Accenture4
Difference between Application and Applet ? Wipro3
heavy components means what?  4
Hey buddy.. can you please tell me about the use of marker interface? And is there any link between marker interface and factory methods? Thanks in advance.  2
which method throws exception of type Throwable  2
how to handle http request in struts Polaris2
what are ER diagrams?  2
What Method and class used for Connection pooling ? Wipro4
What is more advisable to create a thread, by implementing a Runnable interface or by extending Thread class?  5
Difference between String and StringBuffer. IBM3
What are the names of interfaces that doesn't consists of method/s ?  3
What are integer overflows and underflows and how to handle them? Wipro2
What are Inner classes?  3
 
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