adplus-dvertising
frame-decoration

Question

What is the output of this program?
    import java.net.*;
    class networking 
    {
        public static void main(String[] args) throws UnknownHostException 
        {
            InetAddress obj1 = InetAddress.getByName("cisco.com");
            InetAddress obj2 = InetAddress.getByName("compscibits.com");
            boolean x = obj1.equals(obj2); 
            System.out.print(x);
        }
    }

a.

0

b.

1

c.

true

d.

false

Answer: (c).true

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. Which of these interface abstractes the output of messages from httpd?

Q. Which of these class is used to create servers that listen for either local or remote client programs?

Q. Which of these methods is used to make raw MIME formatted string?

Q. Which of these class is used for operating on request from the client to the server?

Q. Which of these method of MimeHeader is used to return the string equivalent of the values stores on MimeHeader?

Q. Which of these is an instance variable of class httpd?

Q. Which of these methods of httpd class is used to read data from the stream?

Q. Which of these method of httpd class is used to get report on each hit to HTTP server?

Q. Which of these methods are used to find a URL from the cache of httpd?

Q. Which of these variables stores the number of hits that are successfully served out of cache?

Q. Which of these method of httpd class is used to write UrlCacheEntry object into local disk?

Q. Which of these method is used to start a server thread?

Q. Which of these method is called when http daemon is acting like a normal web server?

Q. What does URL stands for?

Q. Which of these exceptions is thrown by URL class’s constructors?

Q. Which of these methods is used to know host of an URL?

Q. Which of these methods is used to know the full URL of an URL object?

Q. Which of these class is used to access actual bits or content information of a URL?

Q. Which of these is a wrapper around everything associated with a reply from an http server?

Q. Which of these transfer protocol must be used so that URL can be accessed by URLConnection class object?