Java Reference
In-Depth Information
Review Questions
1.
Name the two common networking protocols discussed in this chapter.
2.
True or False: To create a TCP connection, both the client and server applications need
to be running and available at the same time.
3.
True or False: When a sender sends a datagram packet, the recipient is guaranteed to
receive it, even though this may not happen instantly.
4.
Name the two classes in the Java API used to create a nonsecure socket connection
using TCP.
5.
Name the two classes in the Java API used to send and receive datagram packets.
6.
True or False: Multiple applications on a server can bind the same port and share it.
7.
True or False: I can write a server application that binds to port 80.
8.
List the two ways that the accept() method in the ServerSocket class will stop blocking.
9.
What is the data type of the return value of the accept() method in the ServerSocket
class?
10.
True or False: If a ServerSocket is listening on port 3000 and a client connection is
accepted, the server and client are now communicating by using port 3000.
11.
True or False: The following statement creates a Socket object in memory that is not
yet connected to the server, but can be connected by using the bind() method in the
Socket class:
Socket s = new Socket(“server_name”, 1090);
12.
What does SSL stand for?
13.
Which two classes are used to obtain a secure server socket using the JSSE?
14.
Which two classes are used to obtain a secure socket using the JSSE?
15.
What does URL stand for?
16.
What does URI stand for?
17.
What is the query part of the following URL?
http://www.wiley.com/index.html?language=en#Java
18.
What is the default port of the previous URL? The authority?
19.
What is the actual data type returned from the openConnection() method of the URL
class when invoked on a URL object representing an HTTP resource?
Search WWH ::




Custom Search