// Program to explain the following String function :
// String[ ] split( Stirng regExp )class Msplit
{
public static void main( String args[ ] )
{
String s1 = new String( "Java Programming Examples" );String s2[ ] = s1.split( " " );
System.out.println( " String = " + s2[0] );
System.out.println( " String = " + s2[1] );
System.out.println( " String = " + s2[2] );
}
}
Output:String = Java
String = Programming
String = Examples