public class Lamp { boolean isOn; void turnOn() { isOn = true; System.out.println("The lamp is now on."); } }
Click Run to execute this code.