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

Is it possible to instantiate the abstract class?

0 Answers  


program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called

1 Answers   Huawei,


Why is stringbuffer thread safe?

0 Answers  


What is byte code and why is it important to java’s use for internet programming?

0 Answers  


Why we override equals() method?

0 Answers  






Is list thread safe in java?

0 Answers  


whats is the use of final,in which situation final can be used in the application?

2 Answers   DNS,


Relationship between an event-listener interface and an event-adapter class?

1 Answers  


What are the rules for naming an array?

0 Answers  


What is hashmap and map?

0 Answers  


What is “try and catch” in java

5 Answers   Cap Gemini, TCS,


what is difference between abstract and interface? can i give real time example for the two topics?

7 Answers  


Categories