I'm fairly new to Java but not programming and I ran into this:
InetAddress localAddress = InetAddress.getLocalHost();
It looked off to me. We're declaring localAddress
as type InetAddress
but it's being assigned an instance of a static method of InetAddress
? Can anyone help me understand this?