Tag «substring»

Extract substring from end of a Java String

Today I’ll show you how to extract last few characters (a substring) from a string in Java. Here is the code to do this. public class SubStringEx{ /** Method to get the substring of length n from the end of a string. @param inputString – String from which substring to be extracted. @param subStringLength- int …