Which code creates a server socket on port PORT_NUMBER and listens for a connection?
A) ServerSocket ss = new ServerSocket(PORT_NUMBER) ;
Socket sock = ss.accept() ;
B) Socket ss = new Server(PORT_NUMBER) ;
ServerSocket sock = ss.accept() ;
C) ServerSocket ss = new ServerSocket() ;
Socket sock = ss.accept() ;
D) ServerSocket ss = new ServerSocket(PORT_NUMBER) ;
Socket sock = new Socket(ss.accept() ) ;
Correct Answer:
Verified
Q2: The _ has one function, to attempt
Q3: _ is the protocol that defines communication
Q21: Suppose you use the URLGet program in
Q21: Which of the following statements is correct?
A)HTML
Q23: The _ program is a useful tool
Q25: What are the steps involved in designing
Q28: To connect to the HTTP port (80)
Q28: A(n) _ describes how data for a
Q30: Which of the following HTTP commands supplies
Q36: Which of the following is not an
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents