productimpl.java
来自「经典教材:java核心技术卷1、卷2的所有源代码」· Java 代码 · 共 33 行
JAVA
33 行
/**
@version 1.00 1996-09-07
@author Cay Horstmann
*/
import java.rmi.*;
import java.rmi.server.*;
/**
This is the implementation class for the remote product
objects.
*/
public class ProductImpl
extends UnicastRemoteObject
implements Product
{
/**
Constructs a product implementation
@param n the product name
*/
public ProductImpl(String n) throws RemoteException
{
name = n;
}
public String getDescription() throws RemoteException
{
return "I am a " + name + ". Buy me!";
}
private String name;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?