In the following code fragments add necessary statements: // A Java program for Client // Program to Illustrate Sending and Receiving of Integers across a Stream-mode Socket // Code for a Client Program to Send Two Integers across a Stream-mode Socket import _____________; import _____________; import _____________; class connectionClient{ public static void main(String[ ] args){ try{ InetAddress serverHost = InetAddress.getByName(args[0]); int serverPortNum = Integer.parseInt(args[1]); Socket ____________________________; PrintStream printmass ____________________________________; printmass.println(2); printmass.flush( ); printmass.println(3); printmass.flush( ); ________________. close ( ); } catch(Exception e){e.printStackTrace( );} }}
In the following code fragments add necessary statements:
// A Java program for Client
// Program to Illustrate Sending and Receiving of Integers across a Stream-mode Socket
// Code for a Client Program to Send Two Integers across a Stream-mode Socket
import _____________;
import _____________;
import _____________;
class connectionClient{
public static void main(String[ ] args){
try{
InetAddress serverHost = InetAddress.getByName(args[0]);
int serverPortNum = Integer.parseInt(args[1]);
Socket ____________________________;
PrintStream printmass ____________________________________;
printmass.println(2);
printmass.flush( );
printmass.println(3);
printmass.flush( );
________________. close ( );
}
catch(Exception e){e.printStackTrace( );}
}}
Step by step
Solved in 2 steps