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
Is integer immutable in java?
What is a class reference?
What are internal and external variables?
What are assembly attributes?
What is dynamic binding(late binding)?
What is the arraylist in java?
What is a pointer and does java support pointers?
Can we overload run() method in java?
Explain numeric promotion?
Is array dynamic in java?
Is array size fixed in java?
what is meant by Garbage collection?
Is it possible to instantiate the abstract class?
what are three ways in which a thread can enter the waiting state? : Java thread
How can we make a class virtual?