Results 1 to 2 of 2
  1. #1
    bigboi26 is offline Member
    Join Date
    Mar 2010
    Rep Power

    Default stack overflow error, i want to call a method within itself not using recursion tho

    so i have this problem, i have a 5 by 5 board and i need to randomize the colors of the circles until they are just right. this method i have randomizes the colors and checks to see if they are in the right order, if they are not i call the method again.

    but this might happen 100's or thousands of times, so i get stack overflow. can i call this method again without recursion and make it run faster at the same time?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

Similar Threads

  1. Stack Overflow work around?
    By Coukapecker in forum New To Java
    Replies: 2
    Last Post: 03-14-2010, 09:49 PM
  2. recursion and call stack problem
    By OptimusPrime in forum New To Java
    Replies: 4
    Last Post: 12-26-2009, 10:49 PM
  3. Java Stack Overflow?
    By fullmetaljacket in forum New To Java
    Replies: 0
    Last Post: 05-19-2009, 07:49 PM
  4. Graphics2D: stack overflow error
    By rosh72851 in forum New To Java
    Replies: 11
    Last Post: 10-15-2008, 09:01 PM
  5. cannot call private method from static method
    By jon80 in forum New To Java
    Replies: 3
    Last Post: 05-07-2008, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts