Networking


  1. What does URL stands for?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    URL is Uniform Resource Locator.


  1. Which of these method is used to start a server thread?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    run() method is called when the server thread is started.



  1. Which of these method is called when http daemon is acting like a normal web server?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    handleGet()


  1. What is the output of this program?
    import java.net.*;
    public class networking_Length
    {
    public static void main(String[] args) throws Exception
    {
    URL object = new URL("https://www.interviewmania.com/java/programming");
    URLConnection object0 = object.openConnection();
    int length = object0.getContentLength();
    System.out.print(length);
    }
    }

    Note: Host URL is having length of content 256.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    256



  1. Which of these exceptions is thrown by URL class’s constructors?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    MalformedURLException