Skip to content

Instantly share code, notes, and snippets.

@naoto
Last active December 31, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoto/7983721 to your computer and use it in GitHub Desktop.
Save naoto/7983721 to your computer and use it in GitHub Desktop.
Class Monster {
private static final String EMERGENCY_LIFE_LIMIT = 20;
private String name = "";
private Integer life = 0;
public Monster(String name){
this.name = name;
this.life = 100;
}
public boolean isEmergencyLife(){
return this.life < EMERGENCY_LIFE_LIMIT;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment