Thanks for the contribution.
Edit:
Oh 502 Posts!!!
|
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.
Thanks for the contribution.
Edit:
Oh 502 Posts!!!
Updated with "if return" statements. Not sure if what I did is correct, just a guess from code I've seen before.
That will pretty much help all new coders. Thanks.
Make an informative thread and end it with: "Not sure if this will work.. oh well."?
Not good.
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.
Nope. Any non void method must return its type, so in this case it would have to be return 0;Code:public int getArea() { if(width == 0 && height == 0){ return; } else if (width != 0 && height != 0) { return width * height; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |