设置新对象等于 otherObject.method()?

Set new object equal to otherObject.method()?

我正在学习 java 并且遇到了一些让我很困惑的事情。我正在观看有关 http 请求如何工作的解释的视频...

URL theURL = new URL("http://www.google.com");
**URLConnection theConn = theURL.openConnection();**

我理解第一行,因为它只是创建一个 URL 对象,并将实际的 url 作为参数。但是我不明白在第二行中,如何创建一个 URLConnection 对象并将其设置为等于另一个对象的方法,或者该方法是否返回了一些东西?

该方法返回一个 URLConnection as documented by the URL.openConnection() Javadoc,其中(部分)

Returns a URLConnection instance that represents a connection to the remote object referred to by the URL.