Deck 23: Internet Networkingetext Only
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
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/74
Play
Full screen (f)
Deck 23: Internet Networkingetext Only
1
Two kinds of data are transmitted between computers: ______________ refers to the data that one computer actually wants to send to another.Network protocol data are the data that describe how to reach the intended recipient and how to check for errors and data loss in the transmission.
A.packets
B.transmission data
C.application data
D.socket data
A.packets
B.transmission data
C.application data
D.socket data
application data
2
The ____________ has one function, to attempt to deliver data from one computer to another across the Internet.
A.TCP/IP
B.IP
C.HTTP
D.DNS
A.TCP/IP
B.IP
C.HTTP
D.DNS
IP
3
__________________ is the protocol that defines communication between Web browsers and Web servers.
A.TCP/IP
B.Telnet
C.HTTP
D.IP
A.TCP/IP
B.Telnet
C.HTTP
D.IP
HTTP
4
_______ ________ was developed to enable
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
5
If your data gets lost or garbled during transmission from one computer to another, what is responsible for ensuring that the recipient is aware of the unfortunate fact and does not rely on incomplete data?
A.TCP
B.IP
C.HTTP
D.DNS
A.TCP
B.IP
C.HTTP
D.DNS
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
6
The ____ is a complex collection of pathways on which a message can travel from one access point to another.
A.IP
B.HTTP protocol
C.HTML
D.Internet
A.IP
B.HTTP protocol
C.HTML
D.Internet
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
7
In a communication protocol, can the sender indicate how many bytes are contained in the request?
A.Yes, the web server does that at the end of the GET request.
B.Yes, the web browser does that in POST request.
C.Yes, the web browser does that at the end of the HTTP header.
D.No, the sender can't indicate how many bytes are contained in the request.
A.Yes, the web server does that at the end of the GET request.
B.Yes, the web browser does that in POST request.
C.Yes, the web browser does that at the end of the HTTP header.
D.No, the sender can't indicate how many bytes are contained in the request.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
8
The term _____________ data refers to the data that describe how to reach the intended recipient and how to check for errors and data loss in the transmission.
A.packet
B.socket
C.application data
D.network protocol
A.packet
B.socket
C.application data
D.network protocol
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
9
IP breaks up large chunks of data into more manageable ____________________.
A.packets
B.sockets
C.application data
D.network protocol data
A.packets
B.sockets
C.application data
D.network protocol data
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
10
If a computer wants to request information from gateway.com, it must first ask a(n) ____ server to translate the domain name into a numeric Internet address.
A.DNS
B.socket
C.URL
D.IP
A.DNS
B.socket
C.URL
D.IP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
11
Which of the following is false about packets?
A.They're one of the products of the IP which makes sending and receiving data more manageable
B.They're numbered and the recipient reassembles them in the correct order
C.Each packet is delivered separately
D.Different packets that are part of the same transmission must take the same routes through the internet
A.They're one of the products of the IP which makes sending and receiving data more manageable
B.They're numbered and the recipient reassembles them in the correct order
C.Each packet is delivered separately
D.Different packets that are part of the same transmission must take the same routes through the internet
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
12
____ has built-in provisions for retrying incomplete transmissions.
A.TCP
B.IP
C.DNS
D.HTTP
A.TCP
B.IP
C.DNS
D.HTTP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
13
____________________ has no provision for retrying an incomplete transmission.
A.TCP
B.IP
C.FTP
D.HTTP
A.TCP
B.IP
C.FTP
D.HTTP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
14
What service translates an IP address to a name that is easier to remember?
A.Domain Name System
B.Transmission Control Protocol
C.Distinct Name Signifier
D.Uniform Resource Locator
A.Domain Name System
B.Transmission Control Protocol
C.Distinct Name Signifier
D.Uniform Resource Locator
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
15
_____________ attempts reliable delivery of data, with retries if there are failures.It also notifies the sender whether or not the attempt succeeded.
A.IP
B.FTP
C.HTTP
D.TCP
A.IP
B.FTP
C.HTTP
D.TCP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
16
What does the acronym POP stand for?
A.Point to Point
B.Post Office Point
C.Protocol Of Point
D.Post Office Protocol
A.Point to Point
B.Post Office Point
C.Protocol Of Point
D.Post Office Protocol
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
17
The first time you open a certain webpage, it takes a few seconds to load.Later in the day, you open the same webpage again and it was much quicker.What made this
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
18
The ____________ translates domain names into Internet addresses.
A.DSN
B.DNIP
C.DNS
D.TCP
A.DSN
B.DNIP
C.DNS
D.TCP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
19
What are among the most important pieces of information that must be included in an IP packet?
I) The Internet address of the recipient
II) The URL of the recipient
III) The Internet address of the sender
IV) The port number of the sender
A.Only I, III, and IV
B.Only I, II, and III
C.Only II, III, and IV
D.I, II, III, and IV
I) The Internet address of the recipient
II) The URL of the recipient
III) The Internet address of the sender
IV) The port number of the sender
A.Only I, III, and IV
B.Only I, II, and III
C.Only II, III, and IV
D.I, II, III, and IV
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
20
Each IP ____ is delivered separately, and each one that is a part of the same transmission can take
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following statements is correct?
A.HTML is a protocol that describes the command set for web server requests.
B.Web servers know how to display HTML documents.
C.Web servers know how to issue HTTP commands.
D.The Telnet program is not a browser and does not understand HTML tags.
A.HTML is a protocol that describes the command set for web server requests.
B.Web servers know how to display HTML documents.
C.Web servers know how to issue HTTP commands.
D.The Telnet program is not a browser and does not understand HTML tags.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
22
The HTTP command DELETE ____________.
A.deletes two items, an item on the server and an item from the client.
B.deletes an item from the client.
C.deletes an item on the server.
D.deletes input from a client-side command.
A.deletes two items, an item on the server and an item from the client.
B.deletes an item from the client.
C.deletes an item on the server.
D.deletes input from a client-side command.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
23
The ____ program is a useful tool for establishing test connections with servers.
A.DNS
B.HTML
C.Telnet
D.TCP
A.DNS
B.HTML
C.Telnet
D.TCP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
24
What does the acronym SMTP stand for?
A.Simple Mail Transfer Protocol
B.Small Mail Transport Protocol
C.Simple Mail Transport Protocol
D.Small Mail Transfer Protocol
A.Simple Mail Transfer Protocol
B.Small Mail Transport Protocol
C.Simple Mail Transport Protocol
D.Small Mail Transfer Protocol
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
25
The HTTP command OPTIONS ____________.
A.requests the item's communication options.
B.returns the item's options from the client.
C.returns the item's option on the server.
D.changes the options of the item.
A.requests the item's communication options.
B.returns the item's options from the client.
C.returns the item's option on the server.
D.changes the options of the item.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
26
Write a code fragment that connects to a server running on gorge.divms.uiowa.edu at port 2345 and reads one line of text sent by the server. 

Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
27
The HTTP command POST ____________.
A.returns the requested item.
B.supplies input to a server-side command and returns the result.
C.requests input from the server-side command.
D.supplies input to a client-side command.
A.returns the requested item.
B.supplies input to a server-side command and returns the result.
C.requests input from the server-side command.
D.supplies input to a client-side command.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
28
To connect to the HTTP port (80) of the server yahoo.com, you use:
A.Socket s = new Socket(80, yahoo.com);
B.Socket s = connect("yahoo.com", 80);
C.Socket s = new Socket("yahoo.com", 80);
D.java yahoo.com 80
A.Socket s = new Socket(80, yahoo.com);
B.Socket s = connect("yahoo.com", 80);
C.Socket s = new Socket("yahoo.com", 80);
D.java yahoo.com 80
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
29
Which type of protocol defines communication between the web browsers and web servers?
A.World Wide Web
B.Hypertext Transfer Protocol
C.Transmission Control Protocol
D.Internet Protocol
A.World Wide Web
B.Hypertext Transfer Protocol
C.Transmission Control Protocol
D.Internet Protocol
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
30
Which of the following HTTP commands supplies input to a server-side command and returns the result?
A.CONNECT
B.DELETE
C.HEAD
D.POST
A.CONNECT
B.DELETE
C.HEAD
D.POST
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
31
Which of the following protocols is used to send email messages?
A.POP
B.IP
C.SMTP
D.TCP
A.POP
B.IP
C.SMTP
D.TCP
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
32
A(n) ____ is a pointer to an information resource on the World Wide Web.
A.URL
B.socket
C.IP address
D.domain name
A.URL
B.socket
C.IP address
D.domain name
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
33
The HTTP command GET ____________.
A.returns the requested item.
B.supplies input to a server-side command.
C.requests input from the server-side command.
D.supplies input to a client-side command.
A.returns the requested item.
B.supplies input to a server-side command.
C.requests input from the server-side command.
D.supplies input to a client-side command.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
34
A ______ is an object that encapsulates a TCP connection.
A.packet
B.socket
C.client
D.server
A.packet
B.socket
C.client
D.server
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
35
Suppose that sock refers to a TCP socket connected to another machine, and in is aScanner.Which code sends the string "Who is there?" to the other machine, receives the return answer, and then prints it? 

Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
36
Which of the following is not an HTTP command?
A.HEAD
B.BODY
C.PUT
D.OPTIONS
A.HEAD
B.BODY
C.PUT
D.OPTIONS
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
37
The HTTP command TRACE ____________.
A.traces the requested item.
B.traces an item from the client.
C.traces an item on the server.
D.traces the server communication.
A.traces the requested item.
B.traces an item from the client.
C.traces an item on the server.
D.traces the server communication.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
38
Which of the following is true about web servers?
A.Servers know how to display HTML documents
B.Servers know nothing about HTML
C.Servers know how to issue HTTP commands
D.Servers describes the structure of a document
A.Servers know how to display HTML documents
B.Servers know nothing about HTML
C.Servers know how to issue HTTP commands
D.Servers describes the structure of a document
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
39
The HTTP command HEAD ____________.
A.stores the header information of an item on the server.
B.deletes the header information of an item from the server.
C.requests the header information of an item.
D.traces the header information of an item.
A.stores the header information of an item on the server.
B.deletes the header information of an item from the server.
C.requests the header information of an item.
D.traces the header information of an item.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
40
The HTTP command PUT ____________.
A.returns the requested item.
B.stores an item on the client.
C.stores an item on the server.
D.supplies input to a client-side command.
A.returns the requested item.
B.stores an item on the client.
C.stores an item on the server.
D.supplies input to a client-side command.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
41
Sending commands over a socket connection is ___________.
A.a high-level approach.
B.a Medium-level approach.
C.a low-level approach.
D.a complex approach.
A.a high-level approach.
B.a Medium-level approach.
C.a low-level approach.
D.a complex approach.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
42
Suppose you use the URLGet program in Section 23.5 to get a web page that does not exist on a server (which does exist).Assuming that the server is otherwise working properly, what will happen?
A.The call to openConnection will throw an exception.
B.The call to getResponseCode will return the error code 404.
C.The call to getResponseMessage will return null.
D.The call to getInputStream will throw an exception.
A.The call to openConnection will throw an exception.
B.The call to getResponseCode will return the error code 404.
C.The call to getResponseMessage will return null.
D.The call to getInputStream will throw an exception.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
43
What are the steps involved in designing a client/server application?
I) Design a communication protocol.
II) Test the server with the Telnet program.
III) Implement the server program.
IV) Write a client program.
A.Only I
B.Only I and II
C.Only I, II, and III
D.I, II, III, and IV
I) Design a communication protocol.
II) Test the server with the Telnet program.
III) Implement the server program.
IV) Write a client program.
A.Only I
B.Only I and II
C.Only I, II, and III
D.I, II, III, and IV
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
44
To kill a server that was started in a shell window, ________.
A.press Ctrl+C
B.press Ctrl+Z
C.call the kill method
D.servers don't stop.
A.press Ctrl+C
B.press Ctrl+Z
C.call the kill method
D.servers don't stop.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
45
Which of the following is true about sockets?
A.Sockets are needed in order to communicate with a web server
B.When data is sent to outstream, the socket automatically forwards it to the server
C.The socket closes when transmission over the socket is complete
D.Sockets that are part of the same transmission can take
A.Sockets are needed in order to communicate with a web server
B.When data is sent to outstream, the socket automatically forwards it to the server
C.The socket closes when transmission over the socket is complete
D.Sockets that are part of the same transmission can take
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
46
To retrieve the response code from a URLConnection object, you need __________________.
A.to cast the HttpURLConnection object to the URLConnect subclass.
B.to cast the URLConnection object to the HttpURLConnect subclass.
C.to use the getInputStream() method.
D.to use the getCodeResponse() method.
A.to cast the HttpURLConnection object to the URLConnect subclass.
B.to cast the URLConnection object to the HttpURLConnect subclass.
C.to use the getInputStream() method.
D.to use the getCodeResponse() method.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
47
The ______ method of the ServerSocket class waits for a client connection.
A.wait()
B.connect()
C.accept()
D.next()
A.wait()
B.connect()
C.accept()
D.next()
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
48
A print writer buffers the characters that you send to it.To make sure that the server gets a complete request at a time, you need to ________ the buffer.
A.print
B.send
C.scan
D.flush
A.print
B.send
C.scan
D.flush
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
49
The Java library provides a _________ class that can take care of the socket connection to a web server.
A.SocketConnection
B.ServerConnection
C.ClientConnection
D.URLConnection
A.SocketConnection
B.ServerConnection
C.ClientConnection
D.URLConnection
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
50
Which code creates a server socket on port PORT_NUMBER and listens for a connection? 

Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
51
The ______ method empties the buffer and forwards all waiting characters to the destination.
A.print
B.send
C.scan
D.flush
A.print
B.send
C.scan
D.flush
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
52
Buffering the characters means:
A.characters are immediately sent to their destination.
B.characters are not placed in an array.
C.characters are not immediately sent to their destination.
D.characters are being flushed.
A.characters are immediately sent to their destination.
B.characters are not placed in an array.
C.characters are not immediately sent to their destination.
D.characters are being flushed.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
53
Which code fragment creates a server running at port 6666 and sends one line of text, "Hello from earth" over and over to any machine that connects to the server?



Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
54
For the server to execute the run method in a separate thread for each client, the application program needs to implement the _____ interface.
A.Running
B.Runtime
C.Server
D.Runnable
A.Running
B.Runtime
C.Server
D.Runnable
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
55
The following command:
java pgmName hostname /
lets you retrieve any item from a web server.The slash means:
A.the port of the hostname.
B.the root page of the web server.
C.the character to end the command.
D.the item name needs to be retrieved.
java pgmName hostname /
lets you retrieve any item from a web server.The slash means:
A.the port of the hostname.
B.the root page of the web server.
C.the character to end the command.
D.the item name needs to be retrieved.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
56
For test protocols, turn the socket streams into:
A.scanners and readers.
B.scanners and printers.
C.scanners and writers.
D.scanners and servers.
A.scanners and readers.
B.scanners and printers.
C.scanners and writers.
D.scanners and servers.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
57
_________ objects are used for communication (IO) between two computers (client and server).
A.ServerSocket
B.Socket
C.ClientSocket
D.Packet
A.ServerSocket
B.Socket
C.ClientSocket
D.Packet
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
58
The _________ class makes it easy to fetch a file from a web server.
A.FileConnection
B.ServerConnection
C.ClientConnection
D.URLConnection
A.FileConnection
B.ServerConnection
C.ClientConnection
D.URLConnection
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
59
Which HTTP command supplies input to a server-side command and return the result?
A.Get
B.Options
C.Put
D.Post
A.Get
B.Options
C.Put
D.Post
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
60
A thread dies ______________
A.when the client quits or disconnects.
B.when the run method exits.
C.when the client quits or disconnects and/or when the run method exits.
D.the thread runs forever in the background.
A.when the client quits or disconnects.
B.when the run method exits.
C.when the client quits or disconnects and/or when the run method exits.
D.the thread runs forever in the background.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
61
To retrieve the response code and message from an HttpURLConnection object, you need __________________.
A.to use the getInputStream() method.
B.to use the getURLConnection() method.
C.to use the getResponseCode() and getResponseMessage() methods.
D.to use the getCodeResponse() method.
A.to use the getInputStream() method.
B.to use the getURLConnection() method.
C.to use the getResponseCode() and getResponseMessage() methods.
D.to use the getCodeResponse() method.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
62
To close a connection, which of the following statements can you use? 

Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
63
What does TCP/IP stand for?
A.Transmission Control and Internet Protocol.
B.Transmission Control Protocol and Internet Protocol.
C.Transmission Protocol and Internet Protocol.
D.Transmission Control Protocol over Internet Protocol.
A.Transmission Control and Internet Protocol.
B.Transmission Control Protocol and Internet Protocol.
C.Transmission Protocol and Internet Protocol.
D.Transmission Control Protocol over Internet Protocol.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
64
A successful response has status code _______________.
A.200 OK.
B.404 OK.
C.0 OK.
D.100 OK.
A.200 OK.
B.404 OK.
C.0 OK.
D.100 OK.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
65
What does the following if statement do?
if (code == HttpURLConnetion.HTTP_OK)
A.It checks if the code is 200.
B.It checks if the code is 404.
C.It checks if the connection is still connected.
D.It checks if there is HTTP.
if (code == HttpURLConnetion.HTTP_OK)
A.It checks if the code is 200.
B.It checks if the code is 404.
C.It checks if the connection is still connected.
D.It checks if there is HTTP.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
66
When you communicate with a mail server, you ___________, or you can learn how to use Java mail extensions.
A.can write programs that send GET and POP commands.
B.can write programs that send SMTP and POST commands.
C.can write programs that send GET and POST commands
D.can write programs that send SMTP and POP commands.
A.can write programs that send GET and POP commands.
B.can write programs that send SMTP and POST commands.
C.can write programs that send GET and POST commands
D.can write programs that send SMTP and POP commands.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
67
A page not found has status code _______________.
A.200 not found.
B.404 not found.
C.0 not found.
D.100 not found.
A.200 not found.
B.404 not found.
C.0 not found.
D.100 not found.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
68
Suppose you use the URLGet program in Section 23.5 to get a web page from a server that does not exist, such as http://wombat.java/index.html.What will happen?
A.The call to the URL constructor will throw an exception.
B.The call to getResponseCode will throw an exception.
C.The call to getResponseCode will return the error code 404.
D.The call to getInputStream will throw an exception.
A.The call to the URL constructor will throw an exception.
B.The call to getResponseCode will throw an exception.
C.The call to getResponseCode will return the error code 404.
D.The call to getInputStream will throw an exception.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
69
The HTTP response code 200 means _______________.
A.the response is successful.
B.the page is found successfully.
C.the page was not found.
D.the connection is lost.
A.the response is successful.
B.the page is found successfully.
C.the page was not found.
D.the connection is lost.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
70
The HTTP response code 404 means _______________.
A.the response is successful.
B.the page is found successfully.
C.the page was not found.
D.the connection is lost.
A.the response is successful.
B.the page is found successfully.
C.the page was not found.
D.the connection is lost.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
71
You should use a ______ to connect to a web server.
A.Packet
B.Socket
C.URLConnection
D.HttpURLConnection
A.Packet
B.Socket
C.URLConnection
D.HttpURLConnection
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
72
When you communicate with a web server to obtain data, you have two choices:
I) You can make a socket connection and send GET and POST commands.
II) You can make a server connection and send GET and POST commands.
III) You can use the URLConnection class and have it issue the commands on your behalf.
IV) You can use the URL class and have it issue the commands on your behalf.
A.I and II
B.II and III
C.III and I
D.IV and II
I) You can make a socket connection and send GET and POST commands.
II) You can make a server connection and send GET and POST commands.
III) You can use the URLConnection class and have it issue the commands on your behalf.
IV) You can use the URL class and have it issue the commands on your behalf.
A.I and II
B.II and III
C.III and I
D.IV and II
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
73
What would the getResponseCode return if the response was successful?
A.101
B.404
C.200
D.201
A.101
B.404
C.200
D.201
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
74
To open a connection, which of the following statements can you use? 

Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck