Wednesday, October 14, 2009

Out of Memory Exception in java

When we have 2 methods with following signature:
return_type method(String str);
return_type method(Object str);
if we call method("string") inside method(String str) assuming it will call method(Object str), it won't do so, rather function recursion will occur infinitely resulting in Out of Memory Exception.


No comments: