Some java codes.