How to split the string \"Thequickbrownfoxjumps\" to substrings of equal size in Java. Eg. \"Thequickbrownfoxjumps\" of 4 equal size should give th
\"Thequickbrownfoxjumps\"
You can use substring from String.class (handling exceptions) or from Apache lang commons (it handles exceptions for you)
substring
String.class
static String substring(String str, int start, int end)
Put it inside a loop and you are good to go.