I want to know the host name and provider name for tcs web
mail
Answer Posted / shaik baji
import java.net.*;
class GetIPAddress
{
public static void main(String[] args) throws
Exception
{
InetAddress obj = InetAddress.getLocalHost
();
String ipAddress=obj.getHostAddress();
System.out.println(ipAddress);
}
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain the pointers in Java?
What do you understand by Header linked List?
What are the types of arrays in java?
What about static nested classes in java?
How does system arraycopy work in java?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
What is predicate in java?
What does %d do in java?
What is the difference between form & report?
How thread scheduler schedule the task?
whatis Home interface and Remoteinterface? with example?
Can java hashmap have duplicate keys?
Write a program to print the pattern given below
What are generic methods?
What does string mean in java?