InFynd interview question

Java,sql queries to write and programming 2 on prime.number ,plaindrome ,factorial