Kotlinlearncs.online LogoJava
Return to List

Solve: Simple Object Method 2

Created By: Geoffrey Challen
/ Version: 2021.9.0

Create a class called Simple. Simple should store a single Int value which you can initialize to 0. It should also provide a public method called inverse that takes no parameters and returns the stored value multiplied by -1.

Related Lessons

Stuck? You may find these lessons helpful: