convert each item of a char[] to its ASCII code
<p>How can I convert each item of a char[] (char array) to its ascii code? <code>char_arr[i].charAt(0)</code> doesn't work as the method doesn't exist. I can't use the <code>toString</code> method for <code>char_arr[i]</code>.</p>

<pre><code>import java.util.Scanner;

/**
 * Created by mona on 2/25/16.
 */
public class FunnyString {
    public static void main(String[] args){
        Scanner sc= new Scanner(System.in);

        int num_str;
        num_str=sc.nextInt();
        Boolean flag=true;

        for (int i=0;i&lt;num_str;i++){
            StringBuilder strb  = new StringBuilder(scan.nextLine());
            StringBuilder str_reverse=strb.reverse();
            Char[] strb_arr=strb.toString().toCharArray();
            Char[] strb_rev_arr=str_reverse.toString().toCharArray();
            for (int i=1; i&lt;strb_arr.length;i++){
                if (Math.abs(strb_arr[i]-strb_arr[i-1])!=Math.abs(strb_rev_arr[i]-strb_rev_arr[i-1])){
                    flag=false;
                }
            }
        }
        if (flag==false){
            System.out.println("Not funny");
        }
        else{
            System.out.println("Funny");
        }

    }
}
</code></pre>