title: What does following code means int val = str.charAt(i) - 'a';?
body: <p>The code is taken from career cup book</p>
  
  <pre><code>public static boolean isUniqueChars(String str)  {
  
      if (str.length() &gt; 256) {
          return false;`
      }
  
      int checker = 0;
      for (int i = 0; i &lt; str.length(); i++) {
          int val = str.charAt(i) - 'a';
          if ((checker &amp; (1 &lt;&lt; val)) &gt; 0) return false;
          checker |= (1 &lt;&lt; val);
      }
      return true;
  }
  </code></pre>
  
  <hr>
  
  <p>Thank you for explanation and I am not sure what do I get. Lets look at the following code-</p>
  
  <pre><code>public class ConvertAscii {
  
      public static void main(String args[]){
          String str ="Hello How are you";
          int i =0;
          for(i=0;i&lt;str.length();i++){
              System.out.println(str.charAt(i)-'a');
          }
      }
  
  }
  </code></pre>
  
  <p>It gives me following output-</p>
  
  <p>-24
  12
  32
  34</p>
  
  <p>etc </p>
  
  <p>Also as in the above example we have</p>
  
  <p>For example if str is "fbhsdsbfid" and i is 4 then val is equal to 3. What does subtracting ascii value of character 'a' from another character results in? Please explain more</p>