FAQ
What is the purpose of a method?
- To implement the logic required for specific behaviour or functionality in a class.
- A parameter is part of the method signature
- An argument is part of the method call
- Methods with the same name and purpose, but different signatures.
- One method overload called another overload to prevent repeated code.
- Use overloading when one method requires multiple signatures
- Use overriding when replacing a method defined higher up in the object hierarchy.
Comments
Post a Comment