Infor Interview Question

to write code for palindrome and factorial based on recursion , in any language but their preferred language was java.