Networking


  1. Which of these method of MimeHeader is used to return the string equivalent of the values stores on MimeHeader?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    toString() does the reverse of parse() method, it is used to return the string equivalent of the values stores on MimeHeader.


  1. Which of these is an instance variable of class httpd?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    There are 5 instance variables: port, docRoot, log, cache and stopFlag. All of them are private.



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    toExternalForm() is used to know the full URL of an URL object.


  1. What is the java method for ping?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    inet.isReachable(5000) is a way to ping a server in java.



  1. How does applet and servlet communicate?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Applet and Servlet communicate through HTTP Tunneling.