explain the difference between accessing a class method via -> and via ::
Answer Posted / Sunit Kumar Tiwari
Accessing a class method with an arrow (->) is used when we have an instance of the object, and it allows us to call methods on that specific object. On the other hand, calling a static method uses double colon (::), regardless of whether there's an instance or not.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers