Split the following string into an array according to |:
String numbers = "1|2|3|4|5";
Use split to split
String[] numberArray = numbers.split("//| ");The above method of dividing String types into arrays according to a certain character in Java is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.