- Associated with an object or instance of a class.
- Each instance has its own set of instance variables.
- Exist throughout the lifetime of the object.
- Accessed using object references.
- Declared within a method or block of code.
- Limited to the scope where they are declared.
- Exist only during the execution of that method or block.
- Accessed only within the method or block where they are declared.
A local variable is one that is declared inside a method or constructor as opposed to an instance variable, which is one that is declared in a class but outside of a method. So, the major distinction between an instance variable and a local variable is this.