java string substring

substring() 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 substring() String. substring(int) and substring(int, int) extracts part of a string. substring()…