1. Write a Java function to calculate the factorial of a given number.
2. What is the iTK API for object creation?
3. Explain the first-level and second-level cache in Hibernate.
4. What will you do if you find a bug in production?
5. Write SQL queries demonstrating the use of GROUP BY and HAVING clauses.