dcsimg

Why are there no constructors for the InetAddress class?

Bob Pasker

It is often considered a bad idea to do I/O in a constructor, and all three InetAddress factory methods (getLocalHost, getByName, and getAllByName) need to perform I/O.