Deck 26: Networking
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/13
Play
Full screen (f)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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