title: What is the purpose of adding chars to get an ASCII value?
body: <p><br />
  When testing this (with the below code), the ASCII value for <code>char 'a'</code> is <strong>10</strong>, and the ASCII value for <code>char 'b'</code> is <strong>11</strong>. <em>However</em>, when concatenating <code>char 'a'</code> and <code>char 'b'</code>, the result is <strong>195</strong>.
  <br /><br />
  There must be an error in my logic and/or understanding here... I <em>do</em> understand that chars cannot be concatenated as a String, but what would the ASCII int value of <strong>195</strong> then represent?
  <br /><br />
  <em>And what would be the usage of such a result?</em>
  <br /><br /><hr />
  Here is my code:
  <br /><br /></p>
  
  <pre><code>public class Concatenated
  {
      public static void main(String[] args)
      {
          char char1 = 'a';
          char char2 = 'b';
  
          String str1 = "abc";
  
          String result = "";
          int intResult = 0;
          Concatenated obj = new Concatenated();
  
          // calling methods here
          intResult = obj.getASCII(char1);
          System.out.println("The ASCII value of char \"" + char1 + "\" is: " + intResult + ".");
  
          intResult = obj.getASCII(char2);
          System.out.println("The ASCII value of char \"" + char2 + "\" is: " + intResult + ".");
  
          result = obj.concatChars(char1, char2);
          System.out.println(char1 + " + " + char2 + " = " + result + ".");
  
          result = obj.concatCharString(char1, str1);
          System.out.println("The char \"" + char1 + "\" + the String \"" + str1 + "\" = " + result + ".");
      } // end of main method
  
      public int getASCII(char testChar)
      {
          int ans = Character.getNumericValue(testChar);
  
          return ans;
      } // end of method getASCII
  
      public String concatChars(char firstChar, char secondChar)
      {
          String ans = "";
          ans += firstChar + secondChar; // "+=" is executed last
  
          return ans; // returns ASCII value
      } // end of method concatChars
  
      public String concatCharString(char firstChar, String str)
      {
          String ans = "";
          ans += firstChar + str;
  
          return ans;
      } // end of method concatCharString
  } // end of class Concatenated
  </code></pre>
  
  <p><br /><hr />
  ...the result printed to screen is as follows:
  <br /></p>
  
  <pre><code>The ASCII value of char "a" is: 10.
  The ASCII value of char "b" is: 11.
  a + b = 195.
  The char "a" + the String "abc" = aabc.
  </code></pre>
  
  <p><br /><hr />
  <strong>-- &nbsp;EDIT : &nbsp; --</strong>
  <br /><br />
  As @Marko Topolnik has pointed out below, the method <code>getASCII</code> should be changed to this to return the correct ASCII value (and <strong>not</strong> the UNICODE value):
  <br /></p>
  
  <pre><code>public int getASCII(char testChar)
  {
      // int ans = Character.getNumericValue(testChar); ...returns a UNICODE value!
      int ans = testChar;
  
      return ans;
  } // end of method getASCII
  </code></pre>
  
  <p>I haven't changed the above code to reflect this, for posterity sake.
  <br /><br /></p>