wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JD521 Chapter 13 Quiz

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.
  1. Which networking protocols does the URL class support by default?

a)

HTTP and HTTPS

b)

FTP and SMTP

c)

TCP and UDP

d)

IP and ICMP

2.
  1. Can you use Java to download binary data from an online source?

a)

Yes

b)

No

3.

What are the high-level steps to send form data to a web server using Java? Which classes are involved?

a)

Open a connection, write data, close connection; using URL and URLConnection.

b)

Create a form, submit data, wait for response; using Socket and ServerSocket.

c)

) Serialize form, send serialized data, deserialize response; using ObjectOutputStream and ObjectInputStream.

d)
  1. Open a connection, write data, read response; using URL and HttpURLConnection.

4.

What class do you use to listen for incoming network connections?

a)

Socket

b)

ServerSocket

c)

URLConnection

d)

HttpURLConnection

5.

When creating your own server like you did for the game, are there any rules for picking a port number?

Any number between....

a)

1 and 65535

b)

1024 and 65535

c)

0 and 1023

d)

1024 and 49151

6.

Can a server application written in Java support multiple, simultaneous clients?

a)

Yes, using multithreading.

b)

No, Java supports only one client at a time.

c)

Yes, using a single thread.

d)

No, Java requires an external load balancer for multiple clients.

7.

How many simultaneous servers can a given client Socket instance connect to?

a)

One

b)

Two

c)

Unlimited

d)

Ten

8.

Can you use Java to download binary data from an online source? (Select the best match)

a)

Yes, but only MP3 files

b)

No

c)

Yes

d)

Yes, but only PNG and JPG files

9.

Can a server application written in Java support multiple simultaneous clients?

a)

Only on Linux servers

b)

No, you can only have one client per server

c)

Yes, but only two

d)

Yes

10.

How many simultaneous servers can a given client Socket instance talk to?

a)

1

b)

2

c)

None; the Socket class is not compatible with ServerSocket hosts

d)

65,535

11.

How do you send form data to a web server using Java?

a)

Using a native library

b)

You can't

c)

Using the URL class and the POST command

d)

Using one of the collection classes