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 final modifier?
Write a code to show a static variable?
Are strings immutable in java?
Do I need java on my pc?
What is append function?
How many threads can I run java?
What do you understand by the term polymorphism?
Is there a way to increase the size of an array after its declaration?
How can we make copy of a java object?
What is the default value of local and global variables?
design an lru cache in java?
what are Hostile Applets?
Which is fastest collection in java?
What is multi level inheritance in java?
What function extracts specified characters from a string?