Java's split method USES the example

  • 2020-04-01 03:15:16
  • OfStack


package com.lihua.test;
public class Test {
 
 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:
< img border = 0 id = theimg onclick = window. The open this. (SRC) SRC = "/ / files.jb51.net/file_images/article/201404/20140407085136.jpg? 20143785220 ">


Related articles: