Can't pin point the exception cause by looking at that small piece of codes... Usually, it is from a loop that does not end properly. As a result, the program keeps creating references/objects in the memory. I used the word references because it includes more than just Java objects.
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17
Stack overflow is usually caused by recursively calling a method from itself. (Too many objects created normally throws a OutOfMemoryError exception, not a stack obverflow.) The error messgae tells you the exact line in your code where it happened. Without that info we can't do anything.
JamesCherrill
... trying to help
8,516 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30