subject

The following program is on Oracle-JAVA website. Explain the program and all the relevant terms in the program. package example. hello; import java. rmi. Remote; import java. rmi. RemoteException; public interface Hello extends Remote { String sayHello() throws RemoteException; } package example. hello; import java. rmi. registry. Registry; import java. rmi. registry. LocateRegistry; import java. rmi. RemoteException; import java. rmi. server. UnicastRemoteObject; public class Server implements Hello { public Server() {} public String sayHello() { return "Hello, world!"; } public static void main(String args[]) { try { Server obj = new Server(); Hello stub = (Hello) UnicastRemoteObject. exportObject(obj, 0); // Bind the remote object's stub in the registry Registry registry = LocateRegistry. getRegistry(); registry. bind("Hello", stub); System. err. println("Server ready"); } catch (Exception e) { System. err. println("Server exception: " + e. toString()); e. printStackTrace(); } } } package example. hello; import java. rmi. registry. LocateRegistry; import java. rmi. registry. Registry; public class Client { private Client() {} public static void main(String[] args) { String host = (args. length < 1) ? null : args[0]; try { Registry registry = LocateRegistry. getRegistry(host); Hello stub = (Hello) registry. lookup("Hello"); String response = stub. sayHello(); System. out. println("response: " + response); } catch (Exception e) { System. err. println("Client exception: " + e. toString()); e. printStackTrace(); } } }​

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
Which of the following is not a β€œfatal four” event?
Answers: 2
question
Computers and Technology, 24.06.2019 17:30
What is the main difference between cloud computing and saas? cloud computing is a platform, and saas is software. cloud computing is software, and saas is a platform. cloud computing is a service, and saas is software. cloud computing is a service, and saas is a platform.
Answers: 1
You know the right answer?
The following program is on Oracle-JAVA website. Explain the program and all the relevant terms in t...
Questions
question
Mathematics, 31.03.2021 21:40
question
Mathematics, 31.03.2021 21:40
question
Mathematics, 31.03.2021 21:40
question
Mathematics, 31.03.2021 21:40
question
English, 31.03.2021 21:40
question
Mathematics, 31.03.2021 21:40