I am learning Java and trying to reverse a string without using the built-in StringBuilder.reverse() method.

For example:

Input:

Hello

Expected Output:

olleH

I tried using a loop, but I am confused about the correct logic and the best approach.