Return to Snippet

Revision: 21832
at December 22, 2009 12:28 by juzerali

Initial Code
String str="This is my   Red    house";
String[] result=str.split("  +");

           for (int i=0;i<result.length;i++)
	     System.out.println("The result is ==== "+result[i]);

Initial URL

Initial Description

Initial Title
using the 'split' method in java using 2 or more spaces as a delimiter

Initial Tags

Initial Language