The ________ method of HttpURLConnection class is used to make the connection to the remote object referred by the URL.

  • connect()
  • createConnection()
  • makeConnection()
  • openConnection()
To make a connection to the remote object referred to by a URL using HttpURLConnection, you use the openConnection() method. This method initializes and opens a connection to the specified URL. The other options are not standard methods for this purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *