Deck 26: Networking

Full screen (f)
exit full mode
Question
To be able to send and receive messages in parallel over a network connection, a program must use __________ of execution.

A) one thread.
B) two threads.
C) three threads.
D) four threads.
Use Space or
up arrow
down arrow
to flip the card.
Question
If an ObjectInputStream is used to read information from the server, an __________ is generated when the client attempts to read a value from a stream on which end-of-stream is detected.

A) EOF.
B) EOS.
C) EOFException.
D) EOSException.
Question
A JEditorPane generates HyperlinkEvents only if it is __________.

A) invisible.
B) visible.
C) uneditable.
D) editable.
Question
Once the ServerSocket is created, the server can listen indefinitely (or block) for an attempt by a client to connect. This is accomplished with a call to the ServerSocket method __________.

A) connect.
B) block.
C) accept .
D) listen.
Question
Which statement is false?

A) Streams-based transmission is connection-oriented.
B) Connection-oriented transmission is like the telephone system.
C) Datagram-based transmission is connection oriented.
D) Connectionless transmission is like the way the mail is carried by the postal service.
Question
Specifying a port that is already in use or specifying an invalid port number when creating a DatagramSocket results in a __________.

A) SocketException.
B) PortInUseException.
C) PortException.
D) ConnectException.
Question
The port number at which the server waits for connections is often called the __________ point.

A) handhold.
B) handshake.
C) handoff.
D) handle.
Question
Which statement is false? Normally, an applet __________.

A) is allowed to read files only on the server from which the applet was downloaded.
B) can read files on any server that can be reached over the network.
C) cannot read files on the system on which it executes.
D) has different file access rights than an application running on the same machine.
Question
__________ sockets and the __________ protocol are more desirable for the vast majority of Java programmers.

A) Stream, UDP.
B) Stream, TCP.
C) Datagram, UDP.
D) Datagram, TCP.
Question
A(n) __________ is thrown when a server address indicated by a client cannot be resolved.

A) ConnectException.
B) ServerException.
C) MalformedURLException.
D) UnknownHostException.
Question
Output __________ are typically used to increase the efficiency of an application by sending larger amounts of data fewer times.

A) objects.
B) broadcasters.
C) buffers.
D) None of the above.
Question
Which statement is false?

A) With datagram sockets a process establishes a connection to another process.
B) The TCP protocol is used for transmission with stream sockets.
C) The UDP protocol is used for transmission with datagram sockets.
D) With the UDP protocol packets can be lost, duplicated or even arrive out of sequence.
Question
The Internet address 128.0.0.1 is also known as __________.

A) localhost.
B) remotehost.
C) localserver.
D) remoteserver.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/13
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 26: Networking
1
To be able to send and receive messages in parallel over a network connection, a program must use __________ of execution.

A) one thread.
B) two threads.
C) three threads.
D) four threads.
two threads.
2
If an ObjectInputStream is used to read information from the server, an __________ is generated when the client attempts to read a value from a stream on which end-of-stream is detected.

A) EOF.
B) EOS.
C) EOFException.
D) EOSException.
EOFException.
3
A JEditorPane generates HyperlinkEvents only if it is __________.

A) invisible.
B) visible.
C) uneditable.
D) editable.
uneditable.
4
Once the ServerSocket is created, the server can listen indefinitely (or block) for an attempt by a client to connect. This is accomplished with a call to the ServerSocket method __________.

A) connect.
B) block.
C) accept .
D) listen.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
5
Which statement is false?

A) Streams-based transmission is connection-oriented.
B) Connection-oriented transmission is like the telephone system.
C) Datagram-based transmission is connection oriented.
D) Connectionless transmission is like the way the mail is carried by the postal service.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
6
Specifying a port that is already in use or specifying an invalid port number when creating a DatagramSocket results in a __________.

A) SocketException.
B) PortInUseException.
C) PortException.
D) ConnectException.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
7
The port number at which the server waits for connections is often called the __________ point.

A) handhold.
B) handshake.
C) handoff.
D) handle.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
8
Which statement is false? Normally, an applet __________.

A) is allowed to read files only on the server from which the applet was downloaded.
B) can read files on any server that can be reached over the network.
C) cannot read files on the system on which it executes.
D) has different file access rights than an application running on the same machine.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
9
__________ sockets and the __________ protocol are more desirable for the vast majority of Java programmers.

A) Stream, UDP.
B) Stream, TCP.
C) Datagram, UDP.
D) Datagram, TCP.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
10
A(n) __________ is thrown when a server address indicated by a client cannot be resolved.

A) ConnectException.
B) ServerException.
C) MalformedURLException.
D) UnknownHostException.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
11
Output __________ are typically used to increase the efficiency of an application by sending larger amounts of data fewer times.

A) objects.
B) broadcasters.
C) buffers.
D) None of the above.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
12
Which statement is false?

A) With datagram sockets a process establishes a connection to another process.
B) The TCP protocol is used for transmission with stream sockets.
C) The UDP protocol is used for transmission with datagram sockets.
D) With the UDP protocol packets can be lost, duplicated or even arrive out of sequence.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
13
The Internet address 128.0.0.1 is also known as __________.

A) localhost.
B) remotehost.
C) localserver.
D) remoteserver.
Unlock Deck
Unlock for access to all 13 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 13 flashcards in this deck.