class ChuLing extends Exception{//Զ쳣
	public String toString(){
	return "Ϊ";
}
}
class YueJie extends Exception{	//ԶԽ쳣
	public String toString(){
	return "Խ";	 }		
	}
public class ShiXun1 {	
	public static void main(String[] args){
		try{
	chufa(5,1);    //÷
			shuzu(6);	}    //÷
		catch(ChuLing e)
			{	System.out.println("Զ쳣"+e);}  //Զ쳣
		catch(YueJie f)
		{	System.out.println("Զ쳣"+f);}
}
	public static void chufa (int a,int b) throws ChuLing{ //쳣
		int c=0;
		if(b==0)
		throw new ChuLing();       //׳쳣
		c=a/b;
		System.out.println(a+"/"+b+"Ϊ"+c);			}
	public static void shuzu(int a) throws YueJie{   //Խ쳣
		int b[];
		b=new int[5];
		if(a>5)
			throw new YueJie();    //׳Խ쳣
		for(int i=0;i<a;i++ ){
			b[i]=i;
		  }
	   }	
}
