Answer:
//Method to reverse user text
public static void printReverse(String text) {
//Create a variable to hold the reversed string
//Initialize it to an empty string
String reversedText = "";
//Create a loop that cycles through each character in the text string
//Prepend each character to the reversedText string
for(int i=0; i < text.length(); i++) {
reversedText = text.charAt(i) + reversedText;
}
//Display the reversed text
System.out.println(reversedText);
}
Explanation:
Explanation has been given in the code in form of comments.
Hope this helps!