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 |
Difference between method overloading and method overriding in java ?
Explain treeset?
What is Ideal Design of Class?
What is lambda expression in java?
What does the exclamation mark mean in java?
What is a method in coding?
why we use merge option in hybernate pls give a ex snippet
What is the GregorianCalendar class?
What is initial size of arraylist in java?
When should you use arraylist and when should you use linkedlist?
What is meant by local variable and instance variable?
What are listeners in java and explain ?