Solutions of exirise in Core Java course