What is the output of the following Java program?
class Window {
private int start = 9, end = 17;
boolean reschedule(int s, int e) {
if (s < 0 || e > 24 || s >= e) return false;
start = s; end = e;
return true;
}
int hours() { return end - start; }
}
public class Main {
public static void main(String[] args) {
Window w = new Window();
System.out.println(w.reschedule(18, 22) + " " + w.hours() + " " + w.reschedule(20, 19) + " " + w.hours() + " " + w.reschedule(0, 25) + " " + w.hours());
}
}
Invalid requests change nothing, so start < end always holds.