public interface RemoteService {
String sayHello(String name);
}
public class RemoteServiceImpl implements RemoteService {
@Override
public String sayHello(String name) {
return "Hello, " + name + "!";
}
}
public class Client {
public static void main(String[] args) {
String result = remoteService.sayHello("World");
System.out.println(result);
}
}