client.java

来自「《JAVA分布式程序设计》一书的源代码。」· Java 代码 · 共 25 行

JAVA
25
字号
import org.omg.CORBA.*;/** * @(#)Client.java * @author Qusay H. Mahmoud */public class Client {   public static void main(String argv[]) {      int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};      int b[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};      Arith.AddPackage.arrayHolder result = new Arith.AddPackage.arrayHolder();      try {         ORB orb = ORB.init();          Arith.Add add = Arith.AddHelper.bind(orb, "Arithmetic Server");         add.sum_arrays(a, b, result);         System.out.print("The sum is: ");         for(int i=0; i<10; i++) {            System.out.print(result.value[i]+"   ");         }         System.out.println();      } catch(SystemException se) {         se.printStackTrace();      }   }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?