Oracle interview question

Implement page replacement algorithm in java