构造一个编程代码以反转字符串
// 反转字符串的示例代码
String inputString = "Hello World";

StringBuilder sb = new StringBuilder();

for(int i = inputString.length() - 1; i >= 0; i--){
    sb.append(inputString.charAt(i));
}

String reversedString = sb.toString();
System.out.println(reversedString);
// 输出：dlroW olleH