0
What is the meaning of these sentence...
I don't understand the meaning of this sentence. Thank you for helping me. The sentence is : "The methods in the Collections class are static, so you don't need a Collections object to call them." It is hard for me to understand these two concepts: "static" and the action to calling methods. This is so strange for a beginner programmer!
3 Answers
+ 2
If method is static you don't need to call it like $class->method(), you can call it like Class::Method().
+ 2
The only thing that you need to understand is that a non static method needs an object to access whereas for static method we can directly access by using Class-name. For example, here Collections.sort():
0
thank you very much both of you đ