Cognizant Interview Question

String reverse in Java, Prime numbers in Java