Member variables, and local variables

Member variables:

      Written on the inside methods outside the class and can not be initialized when declared, this class method can be called directly call this class or other methods, member variables of the work area is particularly large,

If you do not give him a member variable declarations about values, he will have a default value, the default value is the numeric type 0 or 0.0, the string is null .......

Local variables  

      Written on the inside class method of variable called local variables must be initialized when declared, in a statement can only use local variables within the method itself, calls, if you do not give local variable, the variable will direct calls to find out output is an address value, with no default

Guess you like

Origin www.cnblogs.com/JiXianSen/p/12128413.html