Method

Noun · Development

Definitions

  1. A function defined on a class or type that operates on an instance's data, receiving the instance as an implicit or explicit first argument (e.g., `self` in Python, `this` in Java/C++). Methods enable encapsulation by bundling behavior with the data it acts on.

    In plain English: A function that belongs to an object and can access and modify that object's data.

    Example: "Call `user.save()` — the save method handles validation and persistence internally."

Related Terms