java , recursion problem , threads

I have genuine doubt regarding java.I know that java doesn’t support more than 1000 recursive calls at online judge ,it shows error. I commented regarding this before and someone said you can write program that switches over one thread to another and so on, but didn’t get such code anywhere .So can anybody Provide me code(proper code to switch over threads),so that i can write recursive programs in java too to get AC?
Providing code help will be appreciated.

plz Help??

???

I am a complete beginner in Java so I can’t help much. However, you may find this link useful: http://stackoverflow.com/questions/15530484/how-to-switch-between-two-thread-back-and-forth

Maybe you are talking about Multithreading in java.You can google "Multithreading, it might be helpful to you.