I want to know the host name and provider name for tcs web
mail

Answers were Sorted based on User's Feedback



I want to know the host name and provider name for tcs web mail..

Answer / deepak divvela

String hostname=Inetaddress.getAddress("portno of tcs
mail").getHostName();

Is This Answer Correct ?    8 Yes 2 No

I want to know the host name and provider name for tcs web mail..

Answer / abhilash

String hostname= InetAddress.getByName("portno of tcs
mail").getHostName();

Is This Answer Correct ?    4 Yes 3 No

I want to know the host name and provider name for tcs web mail..

Answer / ajay agarwal

String hostname=Inetaddress.getAddress("portno of tcs
mail").getHostName();

Is This Answer Correct ?    1 Yes 0 No

I want to know the host name and provider name for tcs web mail..

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

I want to know the host name and provider name for tcs web mail..

Answer / ss

String ipAddress=InetAddress.getByName
("www.tcs.com").getHostAddress();

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

Difference between method overloading and method overriding in java ?

0 Answers  


Explain treeset?

0 Answers  


What is Ideal Design of Class?

2 Answers  


What is lambda expression in java?

0 Answers  


What does the exclamation mark mean in java?

0 Answers  






What is a method in coding?

0 Answers  


why we use merge option in hybernate pls give a ex snippet

0 Answers   CoreObjects,


What is the GregorianCalendar class?

2 Answers   HCL,


What is initial size of arraylist in java?

0 Answers  


When should you use arraylist and when should you use linkedlist?

0 Answers  


What is meant by local variable and instance variable?

0 Answers  


What are listeners in java and explain ?

2 Answers   TCS,


Categories