Home >Java >javaTutorial >Example of using java's split method
package com.lihua.test; public class Test { /** * @param args */ public static void main(String[] args) { String str = "abcdefghij"; String array[] = str.split(""); for (int i = 1; i < array.length; i++) { System.out.println(i + "-->" + array[i]); } } }
The running result is:
For more java split method usage examples and related articles, please pay attention to the PHP Chinese website!