0

Why stackoverflow error outcome in overloading. Int method(int i){return method(i)}

23rd Jan 2017, 8:41 PM
VikAs ShivAwedi
VikAs ShivAwedi - avatar
2 Antworten
+ 5
Stack overflow is when too many methods/actions are started and don't finish running. Since this method keeps calling itself and doesn't have a condition to finish, the computer runs out of memory. Is there something method() is supposed to be doing?
23rd Jan 2017, 8:59 PM
Tamra
Tamra - avatar
0
May be because your method calls itself and creates infinite recursion?
23rd Jan 2017, 8:56 PM
Ivan G
Ivan G - avatar