I want to know the host name and provider name for tcs web
mail
Answers were Sorted based on User's Feedback
Answer / deepak divvela
String hostname=Inetaddress.getAddress("portno of tcs
mail").getHostName();
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / abhilash
String hostname= InetAddress.getByName("portno of tcs
mail").getHostName();
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / ajay agarwal
String hostname=Inetaddress.getAddress("portno of tcs
mail").getHostName();
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
Answer / ss
String ipAddress=InetAddress.getByName
("www.tcs.com").getHostAddress();
| Is This Answer Correct ? | 0 Yes | 2 No |
when we create singleton design then we create private constructtor..so how JVM take private constructor to make object..but it's private..
What are the two types of streams offered by java 8?
What is an accessor?
What is the use of runnable interface?
Can you access non static variable in static context?
How to print nodes of a Binary tree?
List some important characteristics on jre
Say any two properties in beans?
In how many ways we can the thread? in java
why string constant pool in java
Difference between comparator and comparable in java?
Why should we use java?