Home » JAVA Programming » Networking » Question
  1. What is the output of this program?
    import java.net.*;
    public class Networking_Host
    {
    public static void main(String[] args) throws MalformedURLException
    {
    URL object = new URL("https://www.interviewmania.com/programming");
    System.out.print(object.getHost());
    }
    }
    1. www.interviewmania.com
    2. https://www.interviewmania.com/programming
    3. interviewmania.com/programming
    4. https://www.interviewmania
    5. None of these
Correct Option: A

www.interviewmania.com



Your comments will be displayed only after manual approval.