新手问题来了。试图让我的头脑围绕 JAVA。
我如何打印出参考的内容而不仅仅是他们的位置?我的程序是从用户那里获取一些文本,然后以相反的顺序打印出来。
这是我的程序(到目前为止):
package myProgram;
import javax.swing.JOptionPane;
public class someRandomClass {
public static void main(String[] args) {
    String word = JOptionPane.showInputDialog("Write som text here");
    StringBuilder outPut = new StringBuilder();
    for (int i = word.length()-1; i>=0; i--){
        outPut.append(i);
    }
    System.out.println(outPut.toString());
  }
}
我很高兴获得任何帮助和提示!:)