NEW
Font size
WorksheetsJD521 Chapter 13 Quiz
Total questions: 11
Worksheet time: 6mins
Which networking protocols does the URL class support by default?
HTTP and HTTPS
FTP and SMTP
TCP and UDP
IP and ICMP
Can you use Java to download binary data from an online source?
Yes
No
What are the high-level steps to send form data to a web server using Java? Which classes are involved?
Open a connection, write data, close connection; using URL and URLConnection.
Create a form, submit data, wait for response; using Socket and ServerSocket.
) Serialize form, send serialized data, deserialize response; using ObjectOutputStream and ObjectInputStream.
Open a connection, write data, read response; using URL and HttpURLConnection.
What class do you use to listen for incoming network connections?
Socket
ServerSocket
URLConnection
HttpURLConnection
When creating your own server like you did for the game, are there any rules for picking a port number?
Any number between....
1 and 65535
1024 and 65535
0 and 1023
1024 and 49151
Can a server application written in Java support multiple, simultaneous clients?
Yes, using multithreading.
No, Java supports only one client at a time.
Yes, using a single thread.
No, Java requires an external load balancer for multiple clients.
How many simultaneous servers can a given client Socket instance connect to?
One
Two
Unlimited
Ten
Can you use Java to download binary data from an online source? (Select the best match)
Yes, but only MP3 files
No
Yes
Yes, but only PNG and JPG files
Can a server application written in Java support multiple simultaneous clients?
Only on Linux servers
No, you can only have one client per server
Yes, but only two
Yes
How many simultaneous servers can a given client Socket instance talk to?
1
2
None; the Socket class is not compatible with ServerSocket hosts
65,535
How do you send form data to a web server using Java?
Using a native library
You can't
Using the URL class and the POST command
Using one of the collection classes
