x

Choose Country Code

x

Direction

x

Ask a Question

  • Ask a Question
  • Scan a Question
  • Post MCQ
  • Note: File extension must be of jpg, jpeg, png, bmp format and file size must not exceed 5 MB
x

Ask a Question

x

x
x
x
Hire a Tutor

Answers and Solutions

What's Your Question?
Answer

The best way to understand it is understanding the scope of variable:

Look at the example:

class A{

int instance_var=20;

public void test(){

int local_var=10;

}

}

 

If you see above the variable defined in the scope of class is known as instance variable and the variable defined into the method is called as local vriable because the scope of this variable is limited to that method only and not outside of it.

Post Answer and Earn Credit Points

Get 5 credit points for each correct answer. The best one gets 25 in all.

Post Answer