I have a problem to understand the meaning of the connect() method in the URLConnection class. In the following code, if I use the connect()<
connect()
URLConnection
connect()<
You are not always required to explicitly call the connect method to initiate the connection.
Operations that depend on being connected, like getInputStream, getOutputStream, etc, will implicitly perform the connection, if necessary.
getInputStream
getOutputStream
Here's the oracle doc link