I found a cool recursive method in Python, I'd like to use it in Java. Here's the link: Ideone.com | Online Python Interpreter & Debugging Tool

Any idea how I can use this and play with it in Java?