!636 (modern) main { static boolean kevinOn = true; psvm { int b = getBattery(); say(b + " percent"); int last = b; print("I'll be monitoring the battery every 10 seconds."); while (true) { sleep(10000); b = getBattery(); if (b/5 != last/5) { say(b + " percent"); last = b; print("I'll keep checking the battery every 10 seconds..."); } } } static void say(String s) { print(s); if (kevinOn) try { kevin(s); } catch (Throwable e) { e.printStackTrace(); } } }