播州区人民医院在哪里:谁可以帮我把调用加法函数的修改为调用除法的

来源:百度文库 编辑:高校问答 时间:2024/05/02 20:12:30
调用函数是:
{
// Get command-line arguments
int a = Integer.parseInt(args[1]);
int b = Integer.parseInt(args[2]);
URL GSH = new java.net.URL(args[0]);
// Get a reference to the remote web service
MathServiceLocator mathService = new MathServiceLocator();
MathPortType math = mathService.getMathService(GSH);
// Call remote method 'add'
int sum = math.add(a,b);
// Print result
System.out.println(a + " + " + b + " = " + sum);
}catch(Exception e)
{
System.out.println("ERROR!");
e.printStackTrace();
}

直接除不就行了么。