0% found this document useful (0 votes)
8 views

Working Basics Imp Questions

Here is Networking important MCQ

Uploaded by

joshiprakash3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Working Basics Imp Questions

Here is Networking important MCQ

Uploaded by

joshiprakash3030
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Java Networking Interview Questions and Answers

Pdf
Question: 1

What is a socket?
Sockets provide the communication mechanism between two computers using TCP.

A client program creates a socket on its end of the communication and attempts to connect that
socket to a server.

Question: 2

What is DHCP?
Dynamic Host Configuration Protocol, a piece of the TCP/IP protocol suite that handles the
automatic assignment of IP addresses to clients.

Question: 3

What is the difference between TCP and UDP?


These two protocols differ in the way they carry out the action of communicating.

A TCP protocol establishes a two way connection between a pair of computers, while the UDP
protocol is a one way message sender.

The common analogy is that TCP is like making a phone call and carrying on a two way
communication while UDP is like mailing a letter.

Question: 4

What is SMTP?
Simple Mail Transmission Protocol, the TCP/IP Standard for Internet mails.

SMTP exchanges mail between servers; contract this with POP, which transmits mail between a
server and a client.

Question: 5
What are the seven layers of OSI model?
Application

Presentation

Session

Transport

Network

DataLink

Physical Layer

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.
Java Networking Interview Questions and Answers Pdf
Question: 1

What is the proxy server?


A proxy server speaks the client side of a protocol to another server.

This is often required when clients have certain restrictions on which servers they can connect to.

And when several users are hitting a popular website, a proxy server can get the contents of the
web server’s popular pages once, saving expensive internetwork transfers while providing faster
access to those pages to the clients.

Question: 2

What are the disadvantages of Java Sockets?


Socket based communication allows only to send packets of raw data between applications.

Both the client side and server side have to provide mechanisms to make the data useful in any
way.

Question: 3

What are the advantages of Java Sockets?


Sockets are flexible and sufficient. Efficient socket based programming can be easily
implemented for general communications.

It cause low network traffic.

Question: 4

Define network programming?


It refers to writing programs that executes across multiple devices (computers), in which the
devices are all connected to each other using a network.

Question: 5
Which class represents the sockets that both the client
and server use to communicate with each other?
java.net.socket

You might also like