Cognizant Interview Question

Write Java code for Fibonacci series