Tuesday, January 26, 2016

Local variable, Global variable (Instance variables) & Class (static variables)

Hi All...!

Today I'm going to teach about forms of variables, There are 3 types of variables we have to deal with commonly, those are  Local variable, Global variable (Instance variables) & Class (static variables).

Local Variables


Local Variable are the variables that we declare in side the method scope. These variables are born, live and die inside the method.

We can't access these variables from outside the method.

Let's use this local variables in a program,


We can't use local variables outside the method scope







No comments:

Post a Comment