CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: help please!

  1. #1
    Guest

    help please!

    import java.net.*;
    import java.io.*;

    class Hyperlink {
    public static void main(String[] args) throws Exception {

    1. AND HERE I HAVE TO CREATE A URL OBJECT WITH THE FOLLOWING URL
    HTTP://WW.MSN.COM
    2. ALSO I HAVE TO USE THE getPRotocil, getHost, getRef, getPort and getFile method to this URL

    CAN ANYONE HELP PLEASE??

    THANKS


  2. #2
    Join Date
    Dec 1999
    Location
    Chonghe, Taipei County, Taiwan, R.O.C.
    Posts
    231

    Re: help please!

    You may consider the following code snippet :
    URL url = new URL(http://www.msn.com);
    String protocol = url.getProtocol();
    String host = url.getHost();
    String ref = url.getRef();
    int port = url.getPort();
    String file = url.getFile();
    good luck,
    Alfred Wu


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured