Exercise on java.