Networking


  1. How can we invalidate a session?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    We can invalidate session by calling session.invalidate() to destroy the session.


  1. Which method creates unique fields in the HTML which are not shown to the user?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    HTML Hidden field is the simplest way to pass information but it is not secure and a session can be hacked easily.



  1. Which of these is a return type of getAddress() method of DatagramPacket class?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    InetAddress


  1. Which of these methods is used to know the type of content used in the URL?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    getContentType()



  1. Which of these data member of HttpResponse class is used to store the response from an http server?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    When we send a request to an http server it responds with a status code this status code is stored in statusCode and a textual equivalent which is stored in reasonPhrase.