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
What is a lock or purpose of locks in java?
How many types of exception can occur in a java program?
What is your platform’s default character encoding?
What is ‘has a’’ relationship in java?
Why is stringbuffer faster than string?
What is a line separator in java?
How do you implement polymorphism in our day to day life?
What do you understand by weak reference?
How to perform bubble sort in java?
Explain about strings in java?
what is the difference between yielding and sleeping? : Java thread
What is split return?
Which is faster call by value or call by reference?
What is a war file?
What is yield () in java?