0 votes
in JAVA by
Differentiate between instance and local variables.

1 Answer

0 votes
by
For instance, variables are declared inside a class, and the scope is limited to only a specific object.

A local variable can be anywhere inside a method or a specific block of code. Also, the scope is limited to the code segment where the variable is declared.

Related questions

+1 vote
asked May 24, 2019 in JAVA by rajeshsharma
0 votes
asked Jun 16, 2022 in JAVA by Robindeniel
...