please advise below is the code to extract the first 4 characters from the string as shown below..
String external = ak.getReference();
String s= external.substring(0,4);
Can I wrap this into one so that no extra String s need to be created and finally string external will have four initial characters in one go