Public methods are functions or procedures in a class that can be accessed and called from anywhere in the program. They are accessible to all other classes and objects.
congrats on reading the definition of Public Methods. now let's actually learn it.
Private Methods: These are methods that can only be accessed within the same class. It's like an employee-only area in a store where customers cannot enter.
Static methods belong to the class itself rather than an instance of the class. They can be called without creating an object of that class, similar to using a vending machine without needing to own it.
Method Overloading: This is when multiple methods have the same name but different parameters. It's like having different flavors of ice cream with different toppings but all served in cones.