Odd programs in Java