variables, member variables, local variables such as Java easy to confuse concepts
class variables, member variables, local variables
decoration. ( static = " global " , " static " , used to modify member variables and member methods, or static blocks of code (static code blocks are independent of class members, JVM
Member variables (also called " instance variables "," domains ") are also variables that are independent of the method in the class, but no Static decoration.
A local variable is a variable in a method of a class.
Look at the following pseudo-code description:
public class variable{
static int allclicks=0;// class variable
String str= "Hello World";// instance variable
public void Method () {
int i =0;// local variables
}
}
Member variables are also known as :" domain "," instance variable ", which is called in an entity class or data class. Properties or fields . When a member variable can be changed, it is called the state of the object.
Constants: final decoration, values cannot be modified once given
variables, member variables, local variables such as Java easy to confuse concepts