'test'.charAt('not an integer');
This code always returns 't'
, and I'm guessing that when the parameter of charAt()
cannot be converted to an integer, it just returns the first character.
But I can't seem to find this behavior documented. Is my assumption correct and could you point me to a resource that documents this behavior?