Deck 27: 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
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
The port number at which the server waits for connections is often called the __________ point.

A)handhold.
B)handshake.
C)handoff.
D)handle.
Question
A JEditorPane generates HyperlinkEvents only if it is __________.

A)invisible.
B)visible.
C)uneditable.
D)editable.
Question
_________ is thrown when a String that is not in proper URL format is passed to a URL constructor.

A)URLError.
B)MalformedURLException.
C)URLException.
D)IllFormedURLException.
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
__________ 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
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
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? 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
__________ is thrown when a server address indicated by a client cannot be resolved.

A)ConnectException.
B)ServerException.
C)MalformedURLException.
D)UnknownHostException.
Question
Using a URL as an argument to the __________ method of interface AppletContext causes the browser in which an applet is executing to display the URL.

A)showURL.
B)showFile.
C)showHTML.
D)showDocument.
Question
The Internet address 127.0.0.1 is also known as __________.

A)localhost.
B)remotehost.
C)localserver.
D)remoteserver.
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.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/15
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 27: 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.
B
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.
C
3
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.
C
4
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 15 flashcards in this deck.
Unlock Deck
k this deck
5
A JEditorPane generates HyperlinkEvents only if it is __________.

A)invisible.
B)visible.
C)uneditable.
D)editable.
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
6
_________ is thrown when a String that is not in proper URL format is passed to a URL constructor.

A)URLError.
B)MalformedURLException.
C)URLException.
D)IllFormedURLException.
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
7
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 15 flashcards in this deck.
Unlock Deck
k this deck
8
__________ 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 15 flashcards in this deck.
Unlock Deck
k this deck
9
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 15 flashcards in this deck.
Unlock Deck
k this deck
10
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 15 flashcards in this deck.
Unlock Deck
k this deck
11
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 15 flashcards in this deck.
Unlock Deck
k this deck
12
__________ 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 15 flashcards in this deck.
Unlock Deck
k this deck
13
Using a URL as an argument to the __________ method of interface AppletContext causes the browser in which an applet is executing to display the URL.

A)showURL.
B)showFile.
C)showHTML.
D)showDocument.
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
14
The Internet address 127.0.0.1 is also known as __________.

A)localhost.
B)remotehost.
C)localserver.
D)remoteserver.
Unlock Deck
Unlock for access to all 15 flashcards in this deck.
Unlock Deck
k this deck
15
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 15 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 15 flashcards in this deck.