Java Packages-2
Networking Concepts 1) The API doesn’t list any constructors for InetAddress- How do I create an InetAddress instance? ANSWER : In case of InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances. E.g. InetAddress add1; InetAddress add2; try{ add1 = InetAddress.getByName(“java.sun.com”); add2 =…