Cognizant interview question

Write Java code for Fibonacci series