Write a Java program that displays the number of characters, lines and words in a text?