Check out example codes for "java split string without removing". It will help you in understanding the concepts better.
Code Example 1
String string = "Hello-World";
String[] split = string.Replace("-", "#-").Split("#");
//# is added to the Splitpoint so we can split on #
Output:
split = [Hello, -World]
Learn ReactJs, React Native from akashmittal.com