Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

how to find whether a string contains HOST NAME or IP ADDRESS

807605Aug 9 2007 — edited Aug 9 2007
hello all,
i have one input variable as a String.
if it is IP Address then i have to find HOSTNAME.
if it is HOSTNAME then i have to find IP Address.
i can use java.net.InetAddress API for getting IP or HOST only after knowing whether the input is HOST or IP.
any body please help in finding the input is IP or HOST
Regards
R
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2007
Added on Aug 9 2007
2 comments
583 views