Home » JAVA Programming » Networking » Question
  1. What is the output of this program?
    import java.net.*;
    public class networking_Example
    {
    public static void main(String[] args) throws UnknownHostException
    {
    InetAddress object0 = InetAddress.getByName("Interviewmania.com");
    InetAddress object1 = InetAddress.getByName("Interviewmania.com");
    boolean p = object0.equals(object1);
    System.out.print(p);
    }
    }
    1. false
    2. true
    3. Interviewmania
    4. Interviewmania.com
    5. None of these
Correct Option: B

true



Your comments will be displayed only after manual approval.