public class Player { private int hp; public Player(int initHp) { hp = initHp; } public void damage(int damage) { hp -= damage; System.out.printf("%5d のダメージ、残り HP = %5d%n", damage, hp); } }