- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Edit Admin
Ah, the basics of OOP are very hard to understand; I struggled myself for a few hours.
Addendum 2024-11-19 06:44: Just kiddin'. By first thought about C with classes was "Finally I don't have to prefix every function"; OOP is pretty much the natural thing how to order and structure interactions with data - a subject or object does an action, it ain't the other way around.
Edit Admin
Of course the documentation says the parameter is a "group number" but the name of the parameter is just "group". I suppose referring to both of those things as an e.g. "GroupId" would be just waaaay too hard for these bozos.
Admin
Did something like this by accident once, back when I was first learning Java. Had this object representing a UI window, and I wanted to add a function to close it from some other object, named it
public void close()
, had it call thesetVisible(false)
function and tried it out. Turns out that I was using the same name as a deprecated function thatsetVisible()
was using, so it looped until the stack overflowed.Edit Admin
This is a very lame attempt at making CPU work at full capacity, because the stack overflows way too quickly.
Please follow best practices and use timed
while
loops, which also have the added benefit of not crashing the application.Admin
FWIW: In Java a static method overloading a static method doesn't make sense, because - as you can see in the code block itself - you have to specifiy the class name, i.e. even if there is a SubGroupEntity.find(String) that particular method will end up in an endless loop.