+split(delimeiter:String);

Return type String[] (Array of string).
Returns an array of strings consisting of the substrings split by the delimiter.

import  java.lang.String;

class split{
                     public static void main(String[] arg){
                     String[] str="Welcome_to_Java".split("_",0);
                     for(int i=0;i<str.length;i++)
                            System.out.println(str[i]);
                                         }
}

Output:  Welcome
              to
             Java

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons