class Job {
private static int unitPrice = 2000; //ex...
private static boolean whiteColorExemptionFlg = true; //Please change the sign.
public static void main(String[] args) {
int money = 0;
try{
money = overTimePay(6.5);
} catch(WhiteColorException e) {
System.out.println("retirement・・・");
} finally {
System.out.printf("overTimePay = %,d\n", money);
}
}
static int overTimePay(double overTime) throws WhiteColorException{
int money = 0;
money = (int)(overTime * unitPrice * 1.25);
if(whiteColorExemptionFlg == true) throw new WhiteColorException();
return money;
}
}
class WhiteColorException extends Exception {

}