title: how convert char to int and assign to other object in java
body: <p>when i convert char to int and assigned in different variable of cell object<br>
    but one value assigned as 0 other is assigned as ascii value.</p>
  
  <pre><code>class Cell {
      public Cell() {}
  
      public Cell(int row, int col) {
          this.row = row;
          this.col = col;
      }
  
      public int row;
      public int col;
  }
  Cell makeCell(String str) {
          char[] ch = str.toCharArray();
          Cell cell = new Cell();
          cell.row = ch[1] - 1; ** &lt;--- cell.row assigned 0**
          cell.col = ch[0] - 'A'; ** &lt;--- cell.col assigned 48 but why?**
          return cell;
  }
  public static void main(String arg[]){
  Cell cell = makeCell("A1");
  }
  </code></pre>