Can java.lang.String.format(String str, String str1) be used for adding prefix of a particular character.
java.lang.String.format(String str, String str1)
I could do this for a number like:
You can use this hackish way to get your output:
String sendID = "AABB"; String output = String.format("%0"+(32-sendID.length())+"d%s", 0, sendID);