java char At

charAt() StringBuffer Example

To manipulate string, java.lang.StringBuffer class comes with many methods, otherwise which will take long laborious coding as in C/C++. One such method is charAt() StringBuffer that returns the character at the specified index number passed as argument to the method. What Java API says about charAt() StringBuffer: public synchronized char…

charAt() String Example

Many methods exist in java.lang.String class used for different string manipulations like checking the availability of a character, to extract a part of a string or to convert a data type to string etc. The present method is charAt() String. charAt(int index) extracts a single character from a string. Following…