aspose file tools
The moose likes Beginning Java and the fly likes Problem with recursion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Problem with recursion" Watch "Problem with recursion" New topic
Author

Problem with recursion

R Dom
Greenhorn

Joined: Sep 08, 2010
Posts: 19
I have a following code.

The code is to replace the brackets from the formula.



I am trying to call processBrackets method recursively. But I am having problems.
There is some problem in the if loop at the end.
Can anyone help me to make this code correct. The problem is with the call stack.


Cheers,
RD
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

You'll have to explain more what you mean with "There is some problem". What is the problem? What output do you get that you don't expect? What input are you using?
I tested and it works as it has been coded...
What is it that you are trying to achieve that it doesn't do?

Sean


I love this place!
R Dom
Greenhorn

Joined: Sep 08, 2010
Posts: 19
I figured out what was going wrong . Thanks for the reply.
Cheers

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32708
    
    4
. . . well done, but what was wrong. It would help other readers if yo utell them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with recursion
 
Similar Threads
UrlyBird : ArrayList problem
Search Element in array Problem
Return Statements problem
Efficient Nested Iteration over multiple Arrays
Java code for 3Dimensional Array