Java-Insert

Insert The insert( ) method is a companion method of the append( ) method. While the append( ) method enables us to add a new string only at the end of an existing string, the insert( ) method helps us to add a new string from any specified position in the existing string. For example, … Read more…

Java-Extracting Character

Extracting Character The charAt( ) method provides the character at the specified index position. The starting value of the index in the case of a string is zero. For example, in the following program, the character at position 3 in the string “hajsof” is ‘s’. Thus, the str1.charAt(3) method will return the character ‘s’. Concat … Read more…