Add java solution for linkedListCycle