class Demo
{
int a,b;
public int div(int a,int b)
{
return(a/b);
}
}
class ExceptionDemo2
{
public static void main(String[] args)
{
Demo d=new Demo();
int x=d.div(4,2);
System.out.println(x);
}
System.out.println("over");//这一句要放在主函数里,楼主放在主函数外面啦,你让它怎么运行啊
}
|