Capgemini Interview Question

Write a prime number code in Java?