Top 50+ Java Networking Interview Questions and Answers - 2

Question: 6

What transport Layer does?

It ensures that the mail gets to its destination. If a packet fails to get its destination, it handles the process of notifying the sender and requesting that another packet to be sent.

Question: 7

What is the difference between URL instance and URL connection instance?

A URL instance represents the location of a resource, and a URL connection instance represents a link for assessing or communicating with the resource at the location.

Question: 8

When Malformed URLException and UnknownHostException throws?

When the specified URL is not connected then the URL throw Malformed URLException and If InetAddress methods getByName and getLocalHost are unable to resolve the host name they throw an UnknownHostException.

Question: 9

What information is needed to create a TCP Socket?

The Local System’s IP Address and Port Number.

And the Remote System’s IP Address and Port Number

Question: 10

Which class is used by server applications to obtain a port and listen for client requests?

java.net.ServerSocket class is used by server applications to obtain a port and listen for client requests.

Related Questions