in JAVA by
Differentiate between instance and local variables.

1 Answer

0 votes
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

0 votes
asked Dec 16, 2020 in JAVA by SakshiSharma
0 votes
asked Mar 30, 2020 in JAVA by amita rallin
0 votes
asked Mar 10, 2020 in C Plus Plus by rahuljain1