Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Split string into a string array

public class MyClass {
    public static void main(String args[]) {
        String data = "1,2,3,,5,6,,";
        String[] split = data.split(",", -1);
        for (int i=0; i<split.length; i++)
            System.out.println(split[i]);
            
        System.out.println("Done");
        
    }
}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Split #string #string #array
ADD COMMENT
Topic
Name
7+2 =