Arrays with wwords problem

i have a problem i want to output a given string in desending order also by taking out a letter each time.

For example: The user gives a word - ARRAY
It outputs: ARRAY
RRAY
RAY
AY
Y

how do i get the user’s word and make it output it this way. thanks.

Take a look at String.substring(int)

okay i can see how this works but how would i put it in a loop that i don’t have to write a substring code for every letter.

nevermind i got it…thanks tho your help really helped