-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.java
More file actions
27 lines (27 loc) · 777 Bytes
/
Copy pathclient.java
File metadata and controls
27 lines (27 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.io.*;
import java.awt.*;
import java.net.*;
import java.rmi.*;
class client
{
public static void main(String args[])throws Exception
{
Socket s=new Socket("localhost",10);
DataInputStream dis=new DataInputStream(System.in);
DataInputStream in=new DataInputStream(s.getInputStream());
String response=in.readLine();
System.out.println(response);
PrintStream p=new PrintStream(s.getOutputStream());
System.out.println("Enter the First number");
String z=dis.readLine();
p.println(z);
System.out.println("Enter the Second number");
z=dis.readLine();
p.println(z);
System.out.println("Enter the Operation");
z=dis.readLine();
p.println(z);
response=in.readLine();
System.out.println(response);
}
}