5 years ago in Java Socket Programming

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("sanfoundary.com");
boolean x = obj1.equals(obj2);
System.out.print(x);
}
}

[A] 0
[B] 1
[C] true
[D] false
Loading...
Next Question

Overall Stats

Attempted 76
Correct 30
Incorrect 8
Viewed 38

Answers

Guest
Guest
Serkie Mekonnen
Serkie Mekonnen - 1 week ago

Serkie Mekonnen from Dessie, Ethiopia is saying false is correct answer

Vaibhav Bisht
Vaibhav Bisht - 1 month ago

Vaibhav Bisht from Dehradun, India is saying false is correct answer

Kaneez Khadija
Kaneez Khadija - 2 months ago

Kaneez Khadija from Gujranwala, Pakistan is saying 0 is correct answer

Roaa yaseen
Roaa yaseen - 2 months ago

Roaa yaseen from Palestine is saying false is correct answer

zainb ryad
zainb ryad - 2 months ago

zainb ryad from Jenin, Palestine is saying false is correct answer

Related Questions

Which of these is a full form of DNS?

  • [A] Data Network Service
  • [B] Data Name Service
  • [C] Domain Network Service
  • [D] Domian Name Service

Which of these package contains classes and interfaces for networking?

  • [A] java.io
  • [B] java.util
  • [C] java.net
  • [D] java.network

Which of these is an instance variable of class httpd?

  • [A] port
  • [B] cache
  • [C] log
  • [D] All of the mentioned