title: charAt cannot be resolved or is not a field. Did I missed some imports?
body: <pre><code>String word = JOptionPane.showInputDialog("Enter String"); 
  for(int x = 0 ; x &lt;= word.length() ; x++) {
       for( ch = 'a' ; ch &lt;= 'z' ; ch++) {
           num++;
           if(word.charAt[x].equalsIgnoreCase(ch)) {
                 int z += num;
                 num = 0; 
           }
  
       }
  }
  </code></pre>