Previous | Home | Next |
Q.1 The API doesn't list any constructors for InetAddress- How do I create an InetAddress instance?
Answer: In case of InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances.
Example:
InetAddress add1; InetAddress add2; try{ add1 = InetAddress.getByName("java.sun.com"); add2 = InetAddress.getByName("199.22.22.22"); }catch(UnknownHostException e){}
Answer: Yes. Use InetAddress's getLocalHost method.
Answer: Factory methods are merely a convention whereby static methods in a class return an instance of that class. The InetAddress class has no visible constructors. To create an InetAddress object, you have to use one of the available factory methods. In InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances of InetAddress.
Answer: 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.
Answer: 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 web site, 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.
Also, we can get multiple connections for a single server.
Answer: Application, Presentation, Session, Transport, Network, DataLink, Physical Layer.
Answer: 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 be sent.
Answer: Dynamic Host Configuration Protocol, a piece of the TCP/IP protocol suite that handles the automatic assignment of IP addresses to clients.
Answer: Simple Mail Transmission Protocol, the TCP/IP Standard for Internet mails. SMTP exchanges mail between servers; contrast this with POP, which transmits mail between a server and a client.
Q.10 In OSI N/w architecture, the dialogue control and token management are responsibilities of...
(a). Network
(b). Session
(c). Application
(d). DataLink
Answer: (b). Session
(a). Network
(b). Session
(c). Application
(d). DataLink
Answer: (a). Network
Previous | Home | Next |