addser.java

来自「JAVA程序做的一个经典的例子」· Java 代码 · 共 18 行

JAVA
18
字号
/**
 * This class is designed to be packaged with a COM DLL output format.
 * The class has no standard entry points, other than the constructor.
 * Public methods will be exposed as methods on the default COM interface.
 * @com.register ( clsid=FA40CCF5-C6FF-4522-BB9B-CB670E484940, typelib=B04407C8-E315-49DE-9D60-AD2293623E14 )
 */
public class AddSer
{
	// TODO: Add additional methods and code here
	public int sum(int x,int y){
		return x+y;}
	/**
	 * NOTE: To add auto-registration code, refer to the documentation
	 * on the following method
	 *   public static void onCOMRegister(boolean unRegister) {}
	 */
}

⌨️ 快捷键说明

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