sub string get 10 caracter end java code example
Example 1: get first 5 characters of string java
firstFourChars = input.substring(0, 4);
Example 2: str.substring last 2 java
String substring = str.length() > 2 ? str.substring(str.length() - 2) : str;