BCR interview question

How do you show the last line of a file? (unix) What does the code do? (java)