转自 :http://www.cnblogs.com/fsjohnhuang/p/4098623.html

package regex;

public class GetSingleString 
{
	public static void main(String[] args) 
	{
		
		String s="aaaa bbbb cccc";
                String[] split = s.split("\\s+");
		System.out.println(split.length);
		  for(String each : split )
		  {
			  System.out.println( each ) ;
		  }
		
    }


}

 

相关文章:

  • 2022-12-23
  • 2021-07-18
  • 2021-06-18
  • 2022-12-23
  • 2022-01-04
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2021-09-11
  • 2021-12-03
  • 2021-05-29
  • 2022-12-23
  • 2021-08-02
相关资源
相似解决方案