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

What is mnemonic in assembly language?

0 Answers  


What is OOP's Terms with explanation?

0 Answers  


State the merge-sort principle and its time complexity.

0 Answers   Akamai Technologies,


Can static methods access instance variables in java?

0 Answers  


What are the restrictions imposed on method overriding?

0 Answers  






What flag up means?

0 Answers  


What is java english?

0 Answers  


Is java call by reference?

0 Answers  


Is java 9 released?

0 Answers  


Explain the hierarchy of java exception classes?

0 Answers  


Difference between Interface & Abstract class?

5 Answers  


What is regex java?

0 Answers  


Categories