MCQs > IT & Programming > Java > Output of the given program? import java.net. *; class networking { public static void main(String[] args) throws UnknownHostException { InetAddress obj1 = InetAddress.getByName('cisco.co'); System.out.print(obj1.getHostName()); } }

Java MCQs

What is the output of the given 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());
                }
              }


Answer

Correct Answer: cisco.com

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it