Java related codes