What is the difference between a field variable and a local variable?



What is the difference between a field variable and a local variable?..

Answer / Mohd Waseem Akram

"Field variables are members of a class and have a scope that extends to all methods within the class. Local variables, on the other hand, are defined within a method or a block of code and have a limited scope."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the purpose of using java.lang.class class?

1 Answers  


What do you mean by boolean?

1 Answers  


What is thin driver and thick driver. why it is called so?

2 Answers   Logisoft,


Is there any use of an abstract class which has no methods and no attributes?

1 Answers   Wipro,


Which arithmetic operations can result in the throwing of an arithmeticexception?

1 Answers  


How do you classify Dialog Box?

1 Answers   CGI,


What is the difference between iterator and list iterator?

1 Answers  


What is the significance of continue jump statement? Explain with an example.

1 Answers   Amdocs,


Can we execute a program without main?

1 Answers  


What are the procedures?

1 Answers  


What is the disadvantage of synchronization?

1 Answers  


Functionality of JVM?

7 Answers   Infosys,


Categories