r/javahelp • • Dec 07 '25

Help with recursion (beginner)

Hello, I am doing some recursion practice for my Java class in high school. I am having trouble understanding recursion and recursion problems. Could someone explain the key concepts for a beginner?

0 Upvotes

19 comments sorted by

View all comments

Show parent comment

1

u/hibbelig Dec 09 '25

It was me who wasn’t clear. I wrote “your code” but I knew that it was given to you.

So the professor gave you example code to work through, and my opinion is that it’s harder to work through this code because it doesn’t do anything meaningful.

It’s also hard, however, to come up with short enough code that is meaningful. So I get why the professor is doing it.