Here you can find the source of charAt(char[] s, int pos)
private static char charAt(char[] s, int pos)
//package com.java2s; public class Main { private static char charAt(char[] s, int pos) { if (pos >= 0 && pos < s.length) { return s[pos]; }//from w w w.ja v a 2 s. c om return '\0'; } }