Question: We found that different variables are obviously stored, among which the variables x, y, and degree are all randomly generated, but when stored in the collection, it is displayed as the last data stored in the object.
reason:
When we define variables, we define static variables (global variables), which will be initialized outside the class, and this variable will share its resources with other objects. When we repeatedly assign values to static (static) variables, the variables previously assigned in other objects will be overwritten (resource sharing).