Write a java program that will read a line of text that ends with a period, which serves as a sentinel value.Display all the letters that occur in the text, one per line and in alphabetical order, along with the number of times each letter occurs in the text. Use an array of base type int of length 26, so that the element at index 0 containsthe number of 'a's, and so forth.