Skip to content

Instantly share code, notes, and snippets.

@mneko22
Last active August 29, 2015 14:09
Show Gist options
  • Save mneko22/753a5b578ff2c1ba626a to your computer and use it in GitHub Desktop.
Save mneko22/753a5b578ff2c1ba626a to your computer and use it in GitHub Desktop.
class CtrNum
{
static private int count = 0;
private int hp;
private double mp;
public CtrNum(){
hp=100;
mp=100;
count++;
}
public CtrNum(int hp, double mp){
this();
this.hp=hp;
this.mp=mp;
}
public static int getCount(){
return count;
}
public int getHp(){
return hp;
}
public double getMp(){
return mp;
}
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
// Here your code !
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
CtrNum t1=new CtrNum();
System.out.println(CtrNum.getCount());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment