what is the use of rmi?
Java Remote Method Invocation (Java RMI) is a mechanism that allows one Java Virtual Machine (JVM) running object to invoke methods on an object running in another JVM. It facilitates the remote calling of Java object methods and sharing of resources and services.