Google News
logo
Networking - Quiz(MCQ)
A)
Public void connect ()
B)
Public synchronized void close ()
C)
Public Socket accept ()
D)
Public Output Stream get Output Stream ()

Correct Answer : Option (C) :   Public Socket accept ()


Explanation : The Public socket accept () method is used by the ServerSocket class to accept the connection request of exactly one client at a time. The client requests by initializing the socket object with the servers IP address.

A)
Datagram Socket()
B)
Datagram Socket(int port)
C)
Datagram Socket(int address)
D)
Datagram Socket(int port, Int Address address)

Correct Answer : Option (D) :   Datagram Socket(int port, Int Address address)


Explanation : Datagram Socket (int port, Int Address address) is used to create a datagram socket. A datagram socket is created for connection-less communication between the server and the client. There is no accept() method in this class.

A)
IP Address
B)
Socket
C)
Protocol
D)
MAC Address

Correct Answer : Option (A) :   IP Address


Explanation : The java.net.InetAddress class represents IP Address of a particular specified host. It can be used to resolve the host name from the IP address or the IP address from the host name.

A)
Server Socket
B)
Datagram Packet
C)
Datagram Socket
D)
Both Datagram Socket & Datagram Packet

Correct Answer : Option (D) :   Both Datagram Socket & Datagram Packet


Explanation : Datagram is basically some information travelling between the sender and the receiver, but there is no guarantee of its content, arrival or arrival time. Datagram Socket, Datagram Packet are used for connection-less socket programming, while Server Socket is used for connection-oriented socket programming.

A)
cookies
B)
cookie
C)
manipulate
D)
manipulate cookie

Correct Answer : Option (B) :   cookie


Explanation : The cookie property sets or returns all name/value pairs of cookies in the current document. There are no methods involved: cookies are queried, set, and deleted by reading and writing the cookie property of the Document object using specially formatted strings.

A)
Volatile
B)
Non Volatile
C)
Transient
D)
Intransient

Correct Answer : Option (C) :   Transient


Explanation : Cookies are transient by default; the values they store last for the duration of the web browser session but are lost when the user exits the browser. While the browsing session is active the cookie stores the user values in the user’s storage itself and accesses them.

A)
Lifetime
B)
Max-age
C)
Higher-age
D)
Increase-age

Correct Answer : Option (B) :   Max-age


Explanation : If you want a cookie to last beyond a single browsing session, you must tell the browser how long (in seconds) you would like it to retain the cookie by specifying a max-age attribute. A number of seconds until the cookie expires. A zero or negative number will kill the cookie immediately.

A)
Encode()
B)
EncodeURI()
C)
EncodeComponent()
D)
EncodeURIComponent()

Correct Answer : Option (D) :   EncodeURIComponent()


Explanation : Cookie values cannot include semicolons, commas, or whitespace. For this reason, you may want to use the core JavaScript global function encodeURIComponent() to encode the value before storing it in the cookie.

A)
Network-Specific Method
B)
Network-Specific Motion
C)
Network-Specific Membership
D)
Network-Specific Maintaining

Correct Answer : Option (A) :   Network-Specific Method


Explanation : In the network specific forwarding method, there is only one record, the destination of the packet, in the routing table and not the other hosts of the network. The other two forwarding methods are the default method and the next-hop method.

A)
network layer
B)
session layer
C)
transport layer
D)
application layer

Correct Answer : Option (A) :   network layer


Explanation : IPSec is a set of protocols used to provide authentication, data integrity and confidentiality between two machines in an IP network. In the TCP/IP model, it provides security at the IP layer i.e. the network layer.