Write a program in java to accept a string terminated by a full stop. Arrange all the words in descending order of their lengths.Same length of words should be sorted alphabetically. Each word must start woth uppercase and the sentence should be terminated by full stop.
Sample input:This is the human resource department.
Sample output:Department Resource Human This Is.
Sir this is a question of isc class 11.Please provide solution of the above question.