Untitled
unknown
plain_text
a year ago
454 B
4
Indexable
public class Tamp { boolean isOn; void turnOn() { isOn = true; System.out.println("Light on? " + isOn); } void turnOff() { isOn = false; System.out.println("Light on? " + isOn); } boolean isLightOn() { return isOn; } public static void main(String[] args) { Tamp myTamp = new Tamp(); myTamp.turnOn(); myTamp.turnOff(); } }
Editor is loading...
Leave a Comment