943,783 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 9250
  • Java RSS
Nov 22nd, 2008
0

Exception in thread "main" java.lang.StackOverflowError

Expand Post »
i dont know how to solve this problem,,it seems that i dont know how to fixed this error
Exception in thread "main" java.lang.StackOverflowError

please helped me,,im stack on it,,

i just have a class
public class ATM{

BankAccount bank = new BankAccount();
SavingsAccount savings = new SavingsAccount();
CheckingAccount checking = new Checking();

//below are the codes..

it seems that when i will click the error,,those lines showed the error,,and i dont know how to fixed it,,can someone helped me??thanks in advance...
Reputation Points: 5
Solved Threads: 0
Light Poster
l_03 is offline Offline
37 posts
since Oct 2008
Nov 22nd, 2008
0

Re: Exception in thread "main" java.lang.StackOverflowError

A stack overflow error is caused when you run out of stack space. Stack overflow error can mean that you have an infinitely recursive method, since this will cause you to run out of space eventually. The stack is just a block of memory that's made available to your program. I'm pretty sure that block of memory is in RAM but it doesn't matter where it is. If you want to know more about the stack, I'd look up call stack or google stack and look for results pertaining to functions/methods using the stack. Also, you didn't post your code. When you do, make sure its in code tags.
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
Nov 22nd, 2008
0

Re: Exception in thread "main" java.lang.StackOverflowError

my guess would be an unchecked recursion as well, propably unintended.

something like:

Java Syntax (Toggle Plain Text)
  1. public String getText(){
  2. return "The text is = " + getText();
  3. }
Reputation Points: 919
Solved Threads: 356
Nearly a Posting Maven
stultuske is online now Online
2,493 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: reading from file
Next Thread in Java Forum Timeline: countdown timer program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC