public class TryCatchTest2 {
  public static void main(String[] args) {
    int i, m=1;
    try { 
      for (i=0; i<args.length; i++) {
	int a = Integer.parseInt(args[i]);
	if (a==0) throw new Exception("zero");
	m *= a;
      }
    } catch (Exception e) {
      m = 0;
    }
    System.out.println("答は " + m + "です。");
  }
}
