title: Why does this code print the ASCII value instead of the character
body: <p>I thought typecasting to char we do the trick but it just prints ascii values</p>
  
  <pre><code>   String str = JOptionPane.showInputDialog("Enter a word");
  
     str = str.toUpperCase();
     String temp = "";
  
     for(int i = 0 ; i &lt; str.length() ; i++)
     {
         temp += (char)str.charAt(i) + 1;
     }
  
     System.out.println(temp);
  </code></pre>