LinkedIn interview question

give a method signature, implement it in java