Since tomorrow is a holiday here, you get this week's Java Friday Quiz one day early.
Q: Will the following Java program compile, run without exceptions, or not?
import java.util.*;
public class Foo {
public static void main(String[] args) {
List list = Arrays.asList(3, 2, 1, 0);
System.out.println(list.remove(3));
System.out.println(list.remove(2));
System.out.println(list.remove(1));
System.out.println(list.remove(0));
}
}
The strict rules apply this time: no books, no web, no running the compiler?
P.S.: BWT, my internet connection is acting up recently. Yesterday, I came home to find that my connection has been out for an hour and a half. I have to power cycle the DSL modem to bring the connection back up. I'll be out of town starting from tomorrow, which means this blog may be down until I come back next week.
P.P.S.: This month will mark the fifth anniversary (1810 days) of Weiqi Gao's Observations. I'm glad that I had the opportunity to express myself in ways I would never do in person. I'm grateful for the people who followed this blog through the years. I'm particularly delighted when people took the time to comment on this blog, either to correct my mistakes or to provide an alternative point of view on various topics.