6 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");
System.out.print(obj1.getHostName());
}
}

[A] cisco
[B] cisco.com
[C] www.cisco.com
[D] None of the mentioned
Loading...
Next Question

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!


Overall Stats

Attempted 27
Correct 6
Incorrect 4
Viewed 17

Answers

Guest
Guest
Nikhil Jain
Nikhil Jain - 4 years ago

Nikhil Jain from Pune, India is saying www.cisco.com is correct answer

Amit Kumar Singh
Amit Kumar Singh - 4 years ago

Amit Kumar Singh from Pune, India is saying cisco.com is correct answer

Nazia Sayed
Nazia Sayed - 4 years ago

Nazia Sayed from Mumbai, India is saying cisco.com is correct answer

AJAY TIWARI
AJAY TIWARI - 4 years ago

AJAY TIWARI from Patna, India is saying www.cisco.com is correct answer

ashi yadav
ashi yadav - 4 years ago

ashi yadav from Auraiya, India is saying cisco.com is correct answer

Related Questions

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

  • [A] LogMessage
  • [B] LogResponse
  • [C] Httpdserver
  • [D] httpdResponse

Which of these package contains classes and interfaces for networking?

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