Goldman Sachs interview question

To write an algorithm for the fibonacci series and code in java