Thread: Java - "return" Statements

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 Java - "return" Statements 
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Removed... I tried to help all of your mental minds, this was intended towards the idiots who don't know anything, not the "smart, proud" coders who probably don't even know jack shit.
     

  2. #2  
    GooRoo
    Guest
    Thanks for the contribution.
    Edit:
    Oh 502 Posts!!!
     

  3. #3  
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Updated with "if return" statements. Not sure if what I did is correct, just a guess from code I've seen before.
     

  4. #4  
    GooRoo
    Guest
    That will pretty much help all new coders. Thanks.
     

  5. #5  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Make an informative thread and end it with: "Not sure if this will work.. oh well."?

    Not good.
    Ex-super moderator of Rune-Server.org and RSBot.org
     

  6. Thankful users:


  7. #6  
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Quote Originally Posted by Inside Sin View Post
    Make an informative thread and end it with: "Not sure if this will work.. oh well."?

    Not good.
    It's in finishing comments and notes, and not really part of the actual information part. I wasn't sure if it worked. Can you correct me if it doesn't?
     

  8. #7  
    GooRoo
    Guest
    Quote Originally Posted by Inside Sin View Post
    Make an informative thread and end it with: "Not sure if this will work.. oh well."?

    Not good.
    At least he tried and is contributing.
     

  9. Thankful users:


  10. #8  
    Professional Upsetter


    Join Date
    Jul 2006
    Posts
    5,392
    Thanks given
    163
    Thanks received
    447
    Rep Power
    2040
    Quote Originally Posted by Among The Hated View Post
    It's in finishing comments and notes, and not really part of the actual information part. I wasn't sure if it worked. Can you correct me if it doesn't?
    I'm not saying the thread is bad, I'm just saying it demolishes any credibility you need to form this "information" onto us. Imagine if one of my lecturers just said at the end of their lecture "Oh and I'm not sure if this is correct, but oh well. Enjoy". I'd swap lectures faster than ever.
    Ex-super moderator of Rune-Server.org and RSBot.org
     

  11. Thankful user:


  12. #9  
    Super Donator


    Join Date
    Jun 2007
    Age
    31
    Posts
    2,157
    Thanks given
    316
    Thanks received
    282
    Rep Power
    779
    Code:
    public int getArea() {
    if(width == 0 && height == 0){
    return;
    } else if (width != 0 && height != 0) {
    return width * height;
    }
    }
    Nope. Any non void method must return its type, so in this case it would have to be return 0;
     

  13. #10  
    Banned
    Join Date
    Apr 2011
    Age
    29
    Posts
    1,360
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Quote Originally Posted by HloJustin View Post
    Code:
    public int getArea() {
    if(width == 0 && height == 0){
    return;
    } else if (width != 0 && height != 0) {
    return width * height;
    }
    }
    Nope. Any non void method must return its type, so in this case it would have to be return 0;
    K thanks.
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 24
    Last Post: 10-09-2012, 01:33 AM
  2. Java+HTML Question - "include" = "insert"
    By Game Developer in forum Application Development
    Replies: 6
    Last Post: 09-29-2011, 06:55 PM
  3. "hed","head","headicon" command like ::emote Rep++
    By «I Gf I» ©£ in forum Help
    Replies: 12
    Last Post: 10-06-2009, 05:30 AM
  4. "Cheap hack" to use string's in switch statements
    By Zee Best in forum Tutorials
    Replies: 12
    Last Post: 07-03-2009, 05:38 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
  •