Posted By:
evrim_turgay
Posted On:
Tuesday, August 13, 2002 11:52 PM
import java.net.*; public class InetAddress { public static void main (String args[]) { try { InetAddress[] addresses = InetAddress.getAllByName ("www.yahoo.com"); for (int i = 0; i < addresses.length; i++) { System.out.println(addresses[i]); } } catch (UnknownHostException e) { System.out.println("Could not find"); } } } ****this code has runtime error*************************** servletjsp/InetAddress.java [9] cannot resolve symbol symbol : method getAllByName (java.lang.String)
More>>
import java.net.*;
public class InetAddress {
public static void main (String args[]) {
try {
InetAddress[] addresses = InetAddress.getAllByName
("www.yahoo.com");
for (int i = 0; i
< addresses.length; i++) {
System.out.println(addresses[i]);
}
}
catch (UnknownHostException e) {
System.out.println("Could not find");
}
}
}
****this code has runtime error***************************
servletjsp/InetAddress.java [9] cannot resolve symbol
symbol : method getAllByName (java.lang.String)
location: class InetAddress
InetAddress[] addresses = InetAddress.getAllByName("www.yahoo.com");
-------------------------------------^----------------------------
1 error
Errors compiling InetAddress.
***********************************************************
<<Less