Results 1 to 5 of 5
  1. #1
    Chasingxsuns is offline Member
    Join Date
    Jul 2009
    Posts
    56
    Rep Power
    0

    Default URL/comment problem

    I am trying to set an image object with the getImage(URL url) method. The problem is that when I put in the URL, the // at the end of http: makes the rest of the line into a comment. How can I get around this?


    I had to word that sentence a little odd because I have less than 20 posts

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    The URL is in quotes, right? as in
    Java Code:
    getImage(new URL("http://www.foo.com/images.jpg"));
    So the double backslashes shouldn't do anything untoward here, correct?

  3. #3
    Chasingxsuns is offline Member
    Join Date
    Jul 2009
    Posts
    56
    Rep Power
    0

    Default

    Oh okay I didn't have it in quotes or have new URL. Thanks!

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Quote Originally Posted by Chasingxsuns View Post
    Oh okay I didn't have it in quotes or have new URL. Thanks!
    Glad it helped. Keep on codin'.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    Are you working on an IDE? If so most of the IDEs today we have generate the API explanation when you are using any API methods. It clearly mentioned about the data type of any arguments you have to use.

    Anyway, please mark the the thread solved from Thread Tools menu.

Similar Threads

  1. About Comment By Using SAX
    By tapas in forum XML
    Replies: 1
    Last Post: 01-24-2008, 05:29 AM

Posting Permissions

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