编辑代码

public class Main 
{
	public static void main(String[] args) 
    {
        
        int result = divide(4,-2);
        System.out.println(result);
       
	}
    public static int divide (int x,int y)throws Exception 
    {
        int result = x / y;
        return result;
    }
}