Why use LRU algorithm? How to implement Java?

Why use LRU algorithm? How to implement Java?