Please enable JavaScript to use CodeHS

CodeHS Glossary


Behavior Java

The behavior of an object is what the object is able to do. It is the actions that can be performed by the object. For example, if a Rectangle object has an instance method called `getArea` that computes the rectangle's area and returns it, that would be part of the object's behavior. It is able to compute its own area. That is an action that the object can perform.