Exception in thread "main" java.lang.StackOverflowError

Reply

Join Date: Oct 2008
Posts: 37
Reputation: l_03 has a little shameless behaviour in the past 
Solved Threads: 0
l_03 l_03 is offline Offline
Light Poster

Exception in thread "main" java.lang.StackOverflowError

 
0
  #1
Nov 22nd, 2008
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...
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,532
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 191
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso

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

 
0
  #2
Nov 22nd, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

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

 
0
  #3
Nov 22nd, 2008
my guess would be an unchecked recursion as well, propably unintended.

something like:

  1. public String getText(){
  2. return "The text is = " + getText();
  3. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC