For Java, when you create a class, you are describing the appearance and behavior of the object of that class. Unless you create the object of that class with new, you do not actually get any objects. When the new operation is performed, the data storage space is allocated and the method is called by the outside world.
1. What is the static keyword
The static keyword identifies variables and methods that only allocate a single storage space. Don't think about how many objects to create, or even create objects at all. objects or methods that do not create objects can also access static tags.
For static tagged objects, you can manipulate them with objects, or you can manipulate them with classes.
2, some use of static.
For a method of a static tag, you can access only the static tagged object if you want to access the variable in the object.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Java programming idea-—— static keyword