zoukankan      html  css  js  c++  java
  • split的用法回顾,快忘记了@ →@

    split:用for循环时不要忘记是数组名.length

    package com.aaa;
    
    //split的用法把指定的字符串按指定的分割符进行分割,然后返回字符串 数组
    public class fgsd {
    	public static void main(String[] args) {
    		String a = "this is my  subject";// 结果显示少了个字母。对头了
    		String b[] = a.split(" m", 23);
    		for (int i = 0; i < b.length; i++) {
    			System.out.println(b[i]);
    		}
    	}
    
    }
    

      

  • 相关阅读:
    Linux
    Python
    Linux
    Python
    爬虫
    WEB
    法正(13):密谋
    法正(12):张松
    法正(11):入川
    法正(10):袍哥
  • 原文地址:https://www.cnblogs.com/langlove/p/3405358.html
Copyright © 2011-2022 走看看