Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are field variable and local variable?

Answers were Sorted based on User's Feedback



What are field variable and local variable?..

Answer / ranganathkini

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 ?    30 Yes 4 No

What are field variable and local variable?..

Answer / monoranjan gorai

Field Variable is a member of a class whereas Local Variable is a member of a method.

Is This Answer Correct ?    4 Yes 3 No

What are field variable and local variable?..

Answer / ravikiran(aptech mumbai)

field variable is the one which can have different access
local variable access restict to method only

Is This Answer Correct ?    8 Yes 9 No

Post New Answer

More Core Java Interview Questions

Is sizeof a preprocessor?

0 Answers  


How do you trim a space in java?

0 Answers  


Why do we use regex?

0 Answers  


How do you reverse sort a list in java?

0 Answers  


what are the methods in object?

0 Answers   IBS,


How to make class immutable

6 Answers  


What is a parent class in java?

0 Answers  


What are the difference between composition and inheritance in java?

0 Answers  


In java, how we can disallow serialization of variables?

0 Answers  


How do we access static members in java?

0 Answers  


A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.

0 Answers  


What are the OOAD concepts in java explain with examples?

4 Answers   Aricent, CTS,


Categories