Here you can find the source of charAt(CharSequence chars, int i)
Parameter | Description |
---|---|
chars | a parameter |
i | a parameter |
public static char charAt(CharSequence chars, int i)
//package com.java2s; //License from project: Open Source License public class Main { /**/*w w w. j a v a2 s . c om*/ * Convenience for peeking at a character which might be beyond the end of * the sequence. * * @param chars * @param i * @return the char at index i, if within range, or 0 otherwise. */ public static char charAt(CharSequence chars, int i) { return i < chars.length() ? chars.charAt(i) : 0; } }