cd

Published on March 2017 | Categories: Documents | Downloads: 109 | Comments: 0 | Views: 934
of 1
Download PDF   Embed   Report

Comments

Content

import java.net.*;
import java.rmi.*;
import java.io.DataInputStream;
public class Factclient
{
public static void main(String args[])
{
try
{
String FactserverURL="rmi://localhost/Factserver";
FactserverIntf
FactserverIntf=(FactserverIntf)Naming.lookup(FactserverURL);
DataInputStream din=new DataInputStream(System.in);
System.out.println("Enter the number");
int a=Integer.parseInt(din.readLine());
System.out.println("The factorial of the number is");
System.out.println(+FactserverIntf.fact(a));
}
catch(Exception e)
{
System.out.println("Exception:"+e);
}
}
}

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close