Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

When a DNS server accepts and uses incorrect information from a host that has no authority giving that information, then it is called _________(a) DNS lookup(b) DNS hijacking(c) DNS spoofing(d) DNS authorizingI had been asked this question in unit test.This key question is from Security In The Internet in section Networking of Computer Network

Answer»

The correct option is (C) DNS SPOOFING

Explanation: In DNS spoofing, also known as DNS cache poisoning, an attacker gets the valid CREDENTIALS from a victim by spoofing the intended RESOURCE, and tricking the victim to give his/her valid authorization credentials.

2.

PGP encrypts data by using a block cipher called ______(a) international data encryption algorithm(b) private data encryption algorithm(c) internet data encryption algorithm(d) local data encryption algorithmThe question was posed to me during an online interview.My doubt is from Security In The Internet topic in portion Networking of Computer Network

Answer»

The CORRECT choice is (a) international data encryption algorithm

To elaborate: The IDEA was DESIGNED in 1991 by Xuejia Lai and James Massey. Before IDEA, PGP USED the cipher METHOD BassOmatic.

3.

Pretty good privacy (PGP) is used in ______(a) browser security(b) email security(c) FTP security(d) wifi securityThis question was posed to me in a national level competition.Origin of the question is Security In The Internet in portion Networking of Computer Network

Answer»

The CORRECT option is (b) email SECURITY

Explanation: PGP is an encryption method used in e-mail security to encrypt and decrypt the content of an e-mail transmitted over the internet. It makes sure that the MESSAGE cannot be stolen by other UNAUTHORIZED users.

4.

Extensible authentication protocol is authentication framework frequently used in ______(a) wired personal area network(b) wireless networks(c) wired local area network(d) wired metropolitan area networkI had been asked this question during a job interview.Question is taken from Security In The Internet topic in chapter Networking of Computer Network

Answer»

Right answer is (b) wireless networks

To ELABORATE: The EXTENSIBLE Authentication Protocol (EAP) is an authentication protocol used to connect a network NODE to the INTERNET. It designed through EXTENDING the methods used by the Point-to-Point Protocol for authentication.

5.

An attempt to make a computer resource unavailable to its intended users is called ______(a) denial-of-service attack(b) virus attack(c) worms attack(d) botnet processThe question was posed to me during an online interview.My doubt is from Security In The Internet in portion Networking of Computer Network

Answer»

The correct answer is (a) DENIAL-of-service ATTACK

To explain: In a Denial of Service attack, the attacker won’t let the victims access the NETWORK by using a certain method that ensures that an essential network resource is UNAVAILABLE to the VICTIM. The methods that the attacker can use are vulnerability attack, bandwidth flooding and connection flooding.

6.

WPA2 is used for security in _______(a) ethernet(b) bluetooth(c) wi-fi(d) e-mailI had been asked this question in an internship interview.I'd like to ask this question from Security In The Internet in portion Networking of Computer Network

Answer» RIGHT answer is (c) wi-fi

For explanation I would say: WPA2 or WiFi Protected ACCESS 2 is a SECURITY PROTOCOL used to provide users and firms with strong data security and protection for their wireless networks (WiFi) to give them confidence that only authorized users can access their network.
7.

Network layer firewall has two sub-categories called ____________(a) stateful firewall and stateless firewall(b) bit oriented firewall and byte oriented firewall(c) frame firewall and packet firewall(d) network firewall and data firewallThe question was asked in examination.I need to ask this question from Security In The Internet in section Networking of Computer Network

Answer»

The correct choice is (a) STATEFUL firewall and STATELESS firewall

Explanation: Most network layer firewalls can operate as stateful or stateless firewalls, creating two subcategories of the standard network layer firewall. Stateful firewalls have the advantage of being able to track packets over a period of time for greater analysis and accuracy — but they require more memory and operate more slowly. Stateless firewalls do not analyze past traffic and can be useful for systems where SPEED is more IMPORTANT than SECURITY, or for systems that have very specific and limited needs. For example, a computer that only needs to connect to a particular backup server does not need the extra security of a stateful firewall.

8.

Network layer firewall works as a ________(a) frame filter(b) packet filter(c) signal filter(d) content filterThe question was posed to me in homework.Origin of the question is Security In The Internet topic in section Networking of Computer Network

Answer»

Right ANSWER is (b) packet filter

For explanation I would say: As you know, firewalls are available as hardware appliances, as software-only, or a combination of the two. In every case, the purpose of a firewall is to isolate your trusted internal network (or your PERSONAL PC) from the dangers of unknown resources on the Internet and other network connections that MAY be harmful. The firewall prevents unauthorized access to your internal, trusted network from OUTSIDE threats.

9.

In tunnel mode, IPSec protects the ______(a) Entire IP packet(b) IP header(c) IP payload(d) IP trailerThe question was asked by my college director while I was bunking the class.I need to ask this question from Security In The Internet topic in section Networking of Computer Network

Answer»

Correct CHOICE is (a) Entire IP packet

For explanation: In the tunnel mode, IPSEC ADDS control bits into the packets to encrypt the entire packet between the IPSec endpoints. Using encryption, it provides secure COMMUNICATION between the two endpoints.

10.

IPSec is designed to provide security at the _________(a) transport layer(b) network layer(c) application layer(d) session layerThis question was addressed to me by my college director while I was bunking the class.My question is taken from Security In The Internet topic in section Networking of Computer Network

Answer»

The correct option is (b) network layer

Easy 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.

11.

LSP stands for __________(a) Link Stable Packet(b) Link State Packet(c) Link State Protocol(d) Link State PathThe question was posed to me during an interview.I'd like to ask this question from Packet Forwarding and Routing in section Networking of Computer Network

Answer»

Right answer is (b) Link State Packet

To ELABORATE: A Link State Packet is a packet created by a router that lists its neighboring NODES and routers in link state routing protocol. It is SHARED with other routers to find the SHORTEST path from a SOURCE to the destination.

12.

RPF stands for __________(a) Reverse Path Forwarding(b) Reverse Path Failure(c) Reverse Packet Forwarding(d) Reverse Protocol FailureI got this question in an interview for internship.Question is taken from Packet Forwarding and Routing topic in division Networking of Computer Network

Answer»

The correct answer is (a) Reverse Path Forwarding

The explanation: Reverse Path Forwarding is a loop-free forwarding method for multi-cast routing in MODERN SYSTEMS. The method FOCUSES on forwarding the packet AWAY from the source IP in each iteration to make sure there is no loops.

13.

In Multicast Routing Protocol, flooding is used to broadcast packets but it creates ________(a) Gaps(b) Loops(c) Holes(d) LinksThis question was posed to me in homework.Asked question is from Packet Forwarding and Routing topic in division Networking of Computer Network

Answer»

The correct choice is (b) Loops

For explanation: In multicast routing, there is ONE sender and MANY receivers. So FLOODING is the most BASIC METHOD to forward packets to many receivers. The one issue with flooding is that it creates routing loops. One loop prevention method is that the routers will not send the packet to a node where the packet has been received before.

14.

In Unicast Routing, Dijkstra algorithm creates a shortest path tree from a ________(a) Graph(b) Tree(c) Network(d) LinkThe question was posed to me in semester exam.Origin of the question is Packet Forwarding and Routing in section Networking of Computer Network

Answer»

Right answer is (a) Graph

To elaborate: The Djikstra’s shortest path algorithm is the fastest among the ALGORITHMS for finding the shortest path in a graph. But it is a GREEDY method based algorithm so it does not guarantee the shortest path EVERY time.

15.

In Unicast routing, if instability is between three nodes, stability cannot be ________(a) Stable(b) Reversed(c) Guaranteed(d) ForwardThe question was asked in an online interview.My question comes from Packet Forwarding and Routing in portion Networking of Computer Network

Answer»

Right option is (c) GUARANTEED

The best explanation: In Unicast routing, there is only SENDER and one receiver. So, if there is instability between three nodes, in which one is sender, one is receiver and one is the router in the PATH, there is no other path available for the packet and the STABILITY of the network is not guaranteed.

16.

Host-specific routing is used for purposes such as checking route or providing _____(a) Network Measures(b) Security Measures(c) Routing Measures(d) Delivery MeasuresI have been asked this question in an online interview.I'd like to ask this question from Packet Forwarding and Routing topic in chapter Networking of Computer Network

Answer»

Right answer is (B) Security Measures

The best I can EXPLAIN: In host-specific routing, the ROUTE of the packet is defined based on the exact MATCH of the packet’s IP with the routing table entry of the host. It provides the best security for the packet as the packet is forwarded only to routers in the pre-defined path.

17.

Several techniques can make size of routing table manageable and also handle issues such as __________(a) Maturity(b) Error reporting(c) Tunneling(d) SecurityThis question was addressed to me during an internship interview.My question comes from Packet Forwarding and Routing topic in chapter Networking of Computer Network

Answer»

The correct choice is (d) Security

The best I can explain: The size of the routing table in the TECHNIQUE must be manageable for the NETWORK nodes i.e. it must not be too big. Security of the forwarding PACKET is the highest priority for a technique and must be high ENOUGH so that only authorized senders and receivers can access the packet’s CONTENT.

18.

Next-Hop Method is used to reduce contents of a _________(a) Revolving table(b) Rotating Table(c) Routing Table(d) Re-allocate tableI got this question by my school principal while I was bunking the class.My enquiry is from Packet Forwarding and Routing in division Networking of Computer Network

Answer»

The correct choice is (c) Routing Table

Explanation: In the next-HOP forwarding method, the routing table of each router in the path contains the address of only the next hop in the path of PACKET. This method is SUITABLE for SHORT distances only.

19.

A second technique to reduce routing table and simplify searching process is called _________(a) Network-Specific Method(b) Network-Specific Motion(c) Network-Specific Maintaining(d) Network-Specific MembershipThe question was posed to me in a job interview.The query is from Packet Forwarding and Routing topic in section Networking of Computer Network

Answer» CORRECT OPTION is (a) Network-Specific Method

The best 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.
20.

The term that is used to place packet in its route to its destination is called __________(a) Delayed(b) Urgent(c) Forwarding(d) DeliveringThis question was addressed to me in my homework.Question is from Packet Forwarding and Routing topic in chapter Networking of Computer Network

Answer»

The correct choice is (c) Forwarding

Easy explanation: Forwarding is done by the nodes in the path from SOURCE to destination, that are not the intended destination for the packet in ORDER to PASS the packet to the next node in the path. The destination machine does not FORWARD the packet to any other node.

21.

POST operation should be idempotent.(a) True(b) FalseI got this question by my college director while I was bunking the class.Origin of the question is Web Caching topic in section Networking of Computer Network

Answer»

Correct answer is (b) False

Best EXPLANATION: POST operation can cause DIFFERENT result so they are not idempotent. The DELETE and PUT operations are idempotent as they invoke the same result EVERY time they are called.

22.

In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.(a) False(b) TrueI had been asked this question in a job interview.This question is from Web Caching in section Networking of Computer Network

Answer»

Correct answer is (B) True

The best explanation: In REST architecture, a REST Server SIMPLY provides ACCESS to resources and REST client accesses and presents the resources. It is popularly used because it MAKES efficient use of the bandwidth and can be cached for better performance and scalability.

23.

Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?(a) @PathParam(b) @QueryParam(c) @MatrixParam(d) @HeaderParamI have been asked this question during an internship interview.This interesting question is from Web Caching in portion Networking of Computer Network

Answer» CORRECT choice is (c) @MatrixParam

Explanation: @MatrixParam is the annotation that binds the parameter PASSED to method to a HTTP matrix parameter in PATH, while @QueryParam binds to a query parameter, @PathParam binds to a VALUE and @HeaderParam binds to the HTTP header in the path.
24.

Which of the following annotation of JAX RS API is used to annotate a method used to create resource?(a) @Path(b) @GET(c) @PUT(d) @POSTI had been asked this question in a national level competition.I need to ask this question from Web Caching in division Networking of Computer Network

Answer»

The correct OPTION is (c) @PUT

The best I can explain: @PUT is the HTTP request that is USED to create resource and ALSO define a complete resource PATH. @POST may also be used to create a resource but it won’t define a resource path i.e. an accessing medium.

25.

Which of the following HTTP Status code means CREATED, when a resource is successful created using POST or PUT request?(a) 200(b) 201(c) 204(d) 304This question was addressed to me in examination.Enquiry is from Web Caching in section Networking of Computer Network

Answer»

Correct option is (b) 201

For explanation: HTTP Status Code 201 MEANS CREATED, when a resource is successful created USING POST or PUT request. The code 200 means SUCCESS i.e. OK, code 204 means NO CONTENT, and the code 304 means NOT MODIFIED.

26.

Which of the following directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server?(a) Public(b) Private(c) Nocache/nostore(d) MaxageThis question was addressed to me in an online quiz.My question is taken from Web Caching topic in section Networking of Computer Network

Answer»

Correct ANSWER is (b) PRIVATE

To elaborate: Private directive indicates that resource is cachable by only client and server; no intermediary can cache the resource. But if we USE the public directive, it indicates that the resource MAY be cachable by any intermediary component.

27.

Which of the following HTTP methods should be idempotent in nature?(a) OPTIONS(b) DELETE(c) POST(d) HEADThe question was asked in an online quiz.This interesting question is from Web Caching in division Networking of Computer Network

Answer»

The correct choice is (b) DELETE

Explanation: DELETE operation should be idempotent, means their result will always same no matter how MANY times these OPERATIONS are INVOKED. Also, the PUT operation is supposed to be idempotent.

28.

Which of the following is not a good practice to create a standard URI for a web service?(a) Maintain Backward Compatibility(b) Use HTTP Verb(c) Using spaces for long resource names(d) Use lowercase lettersI got this question in an online quiz.This interesting question is from Web Caching in chapter Networking of Computer Network

Answer» CORRECT option is (c) Using spaces for long resource names

To ELABORATE: We must use hyphens (-) or UNDERSCORES (_) instead of spaces to represent long resource names. It may lead to the resource to be less recognizable for the SYSTEM if we use spaces instead.
29.

Which of the following protocol is used by Restful web services as a medium of communication between client and server?(a) HTTP(b) FTP(c) Gopher(d) TELNETThis question was posed to me during an online interview.This is a very interesting question from Web Caching in section Networking of Computer Network

Answer»

Right answer is (a) HTTP

The best explanation: Restful web SERVICES make use of HTTP PROTOCOL as a medium of communication between CLIENT and server. The REST architecture was KNOWN as the HTTP object model back in the year 1994.

30.

What does REST stand for?(a) Represent State Transfer(b) Representational State Transfer(c) Representing State Transfer(d) Representation State TransferI got this question in my homework.My doubt is from Web Caching topic in section Networking of Computer Network

Answer»

The correct choice is (b) Representational State Transfer

Explanation: REST stands for Representational State Transfer and is a software architecture STYLE in which the SERVER sends a REPRESENTATION of the state of the resource that it requests. It provides INTEROPERABILITY between the systems.

31.

What is the constraint on the data per cookie?(a) 2 KB(b) 1 KB(c) 4 KB(d) 3 KBThe question was posed to me in an online interview.The origin of the question is Cookies in section Networking of Computer Network

Answer»

Correct choice is (c) 4 KB

The BEST I can explain: Each cookie can hold up to only 4 KB. In practice, browsers allow MANY more than 300 COOKIES total, but the 4 KB SIZE limit may still be enforced by some. Storage of a session has to be a minimum of 5MB.

32.

Which of the following function is used as a consequence of not including semicolons, Commas or whitespace in the Cookie value?(a) EncodeURIComponent()(b) EncodeURI()(c) EncodeComponent()(d) Encode()I have been asked this question in unit test.My question comes from Cookies topic in portion Networking of Computer Network

Answer»

Correct choice is (a) EncodeURIComponent()

For 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.

33.

Which of the following is a Boolean cookie attribute?(a) Bool(b) Secure(c) Lookup(d) DomainI got this question in an online interview.My enquiry is from Cookies in division Networking of Computer Network

Answer»

Right choice is (B) SECURE

The best explanation: The FINAL cookie attribute is a boolean attribute named secure that specifies how cookie values are transmitted over the network. By default, cookies are INSECURE, which means that they are transmitted over a normal, insecure HTTP connection. If a cookie is marked secure, however, it is transmitted only when the browser and server are connected via HTTPS or another secure protocol.

34.

How can you set a Cookie visibility scope to local Storage?(a) /(b) %(c) *(d) #This question was posed to me in unit test.My question is from Cookies topic in portion Networking of Computer Network

Answer»

The correct OPTION is (a) /

To ELABORATE: SETTING the path of a cookie to “/” gives scoping like that of localStorage and also specifies that the browser must transmit the cookie NAME and value to the server whenever it requests any web page on the site.

35.

Which of the following can be used to configure the scope of the Cookie visibility?(a) Path(b) Domain(c) Both Pathand Domain(d) ServerThe question was posed to me during an interview for a job.I would like to ask this question from Cookies in section Networking of Computer Network

Answer»

Right ANSWER is (d) Server

Easy explanation: The Cookie visibility SCOPE is configurable through cookie attributes path and domain. Domain attribute in the cookie is USED to SPECIFY the domain for which the cookie is sent. Path INCLUDES the Path attribute in the cookie to specify the path for which this cookie is sent.

36.

Which of the following defines the Cookie visibility?(a) Document Path(b) LocalStorage(c) SessionStorage(d) All of the mentionedThis question was addressed to me during an interview for a job.I need to ask this question from Cookies topic in division Networking of Computer Network

Answer»

Correct choice is (d) All of the mentioned

Explanation: sessionStorage, LOCALSTORAGE and Document path all are used to STORE data on the client-side. Each ONE has its own storage and expiration limit. Cookie VISIBILITY is scoped by the document origin as Local Storage and Session Storage are, and also by document path.

37.

Which attribute is used to extend the lifetime of a cookie?(a) Higher-age(b) Increase-age(c) Max-age(d) LifetimeThe question was asked in an international level competition.I'm obligated to ask this question of Cookies in portion Networking of Computer Network

Answer»

The correct CHOICE is (c) 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.

38.

Which of the following explains Cookies nature?(a) Non Volatile(b) Volatile(c) Intransient(d) TransientThis question was posed to me in an interview for job.This interesting question is from Cookies topic in chapter Networking of Computer Network

Answer»

Correct choice is (d) Transient

To elaborate: 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.

39.

The Cookie manipulation is done using which property?(a) cookie(b) cookies(c) manipulate(d) manipulate cookieI had been asked this question in a national level competition.My doubt stems from Cookies in portion Networking of Computer Network

Answer»

The correct option is (a) cookie

The best 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.

40.

Cookies were originally designed for ____________(a) Client side programming(b) Server side programming(c) Both Client side programming and Server side programming(d) Socket programmingThis question was posed to me in a job interview.Question is taken from Cookies in portion Networking of Computer Network

Answer»

Right ANSWER is (B) Server SIDE programming

Explanation: Cookies were originally designed for server side programming, and at the LOWEST level, they are implemented as an extension to the HTTP protocol. They were introduced with the intention of providing a better user experience for the websites.

41.

Which classes are used for connection-less socket programming?(a) Datagram Socket(b) Datagram Packet(c) Both Datagram Socket & Datagram Packet(d) Server SocketI had been asked this question in a job interview.The query is from Socket Programming topic in portion Networking of Computer Network

Answer»

Correct option is (c) 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.

42.

In Inet Address class, which method returns the host name of the IP Address?(a) Public String get Hostname()(b) Public String getHostAddress()(c) Public static InetAddress get Localhost()(d) Public getByName()This question was posed to me in a job interview.This interesting question is from Socket Programming in chapter Networking of Computer Network

Answer»

Correct OPTION is (a) Public STRING get Hostname()

The best explanation: In Inet Address CLASS public String getHostname() method RETURNS the host name of the IP Address. The getHostAddress() method returns the IP address of the given host name.

43.

The flush () method of Print Stream class flushes any un-cleared buffers in the memory.(a) True(b) FalseThe question was posed to me in homework.This key question is from Socket Programming topic in section Networking of Computer Network

Answer»

The correct option is (a) True

To elaborate: The FLUSH () method of PRINT STREAM CLASS FLUSHES any un cleared buffers in memory.

44.

What does the java.net.InetAddress class represent?(a) Socket(b) IP Address(c) Protocol(d) MAC AddressI got this question by my school teacher while I was bunking the class.This interesting question is from Socket Programming in section Networking of Computer Network

Answer»

Correct OPTION is (B) IP Address

Best 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.

45.

TCP, FTP, Telnet, SMTP, POP etc. are examples of ___________(a) Socket(b) IP Address(c) Protocol(d) MAC AddressI had been asked this question by my school principal while I was bunking the class.The query is from Socket Programming topic in section Networking of Computer Network

Answer»

The CORRECT choice is (c) PROTOCOL

The best explanation: TCP, FTP, Telnet, SMTP, POP etc. are examples of Protocol. Out of them, TCP is a transport layer protocol and FTP, TELNET, SMTP and POP are application layer PROTOCOLS.

46.

Datagram is basically just a piece of information but there is no guarantee of its content, arrival or arrival time.(a) True(b) FalseThis question was addressed to me in an international level competition.The query is from Socket Programming in section Networking of Computer Network

Answer»

Correct answer is (a) True

The best 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. A Datagram SOCKET CLASS object is created to make a datagram CONNECTION between the server and the client.

47.

The URL Connection class can be used to read and write data to the specified resource that is referred by the URL.(a) True(b) FalseI had been asked this question in semester exam.This interesting question is from Socket Programming topic in chapter Networking of Computer Network

Answer»

The correct ANSWER is (a) True

To elaborate: The URL Connection CLASS can be used to READ and write data to the SPECIFIED resource referred by the URL. A connection to the URL is initialized by the OpenConnection() METHOD of the class.

48.

The client in socket programming must know which information?(a) IP address of Server(b) Port number(c) Both IP address of Server & Port number(d) Only its own IP addressI got this question by my school principal while I was bunking the class.My question is from Socket Programming topic in section Networking of Computer Network

Answer»

Correct ANSWER is (c) Both IP ADDRESS of SERVER & Port number

The explanation is: The client in socket PROGRAMMING must know IP address of Server as it has to use that IP address in order to initialize the socket class constructor. That is how the client requests a connection to the server.

49.

Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?(a) Datagram Socket(int port)(b) Datagram Socket(int port, Int Address address)(c) Datagram Socket()(d) Datagram Socket(int address)The question was posed to me in homework.Query is from Socket Programming in portion Networking of Computer Network

Answer» CORRECT option is (b) Datagram Socket(int PORT, Int Address address)

To explain I would say: 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.
50.

Which methods are commonly used in Server Socket class?(a) Public Output Stream get Output Stream ()(b) Public Socket accept ()(c) Public synchronized void close ()(d) Public void connect ()I had been asked this question in an international level competition.Enquiry is from Socket Programming topic in section Networking of Computer Network

Answer»

Correct option is (b) Public Socket accept ()

To explain I would say: 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.