12. Describe What Your Object Is Like

In This Chapter

Create variables for an object or class

Use methods with objects and classes

Call a method and return a value

Create a constructor

Send arguments to a method

Use this to refer to an object

Create new objects

As you learned during the past chapter’s introduction to object-oriented programming (OOP), an object is a way of organizing a program so it has everything it needs to accomplish a task. Objects consist of attributes and behavior.

Attributes are the information stored within an object. They can be variables such as integers, characters, and Boolean values or objects such as String and Calendar objects. Behavior consists of the groups of statements used to handle specific ...

Get Absolute Beginner’s Guide to Minecraft® Mods Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.