student.java
来自「来看一个RMI的示例。原理一定要搞清楚.」· Java 代码 · 共 34 行
JAVA
34 行
package dfbz.rmi;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class Student extends UnicastRemoteObject implements IStudent {
private String name;
private int age;
public Student() throws RemoteException{
}
public int getAge() throws RemoteException{
System.out.println("getAge");
return age;
}
public void setAge(int age) throws RemoteException{
System.out.println("setAge");
this.age = age;
}
public String getName() throws RemoteException{
System.out.println("getName");
return name;
}
public void setName(String name) throws RemoteException{
System.out.println("setName");
this.name = name;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?