• (nodebb)

    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.

  • (nodebb)

    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.

  • Vera (unregistered)

    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 the setVisible(false) function and tried it out. Turns out that I was using the same name as a deprecated function that setVisible() was using, so it looped until the stack overflowed.

  • (nodebb)

    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.

  • Lothar (unregistered)

    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.

Leave a comment on “Recursive Search”

Log In or post as a guest

Replying to comment #:

« Return to Article