|
lundi, décembre 31, 2018
Inscription à :
Publier les commentaires (Atom)
Stack Overflow Error LookupThe class above demonstrates three types of unbounded recursion: accidental and completely unintended recursion, unintended recursion associated with intentionally cyclic relationships, and intended recursion with insufficient termination condition. Each of these and their output are discussed next. Completely Unintended Recursion There can be times when recursion occurs with no intent of it whatsoever. A common cause might be having a method accidentally call itself. For example, it is not too difficult to get a little too careless and select an IDE's first recommendation on a return value for a "get" method that might end up being a call to that very same method. This is in fact the example shown in the class above. The getStringVar() method repeatedly calls itself until the StackOverflowError is encountered. yep. imagine the universe is your mattress covered in marbles. all are perfectly still and balanced. now step on the mattress and what happens? all the marbles roll to your.
|
Aucun commentaire:
Enregistrer un commentaire