Answers for "string to array of string"

1

string to string array java

String[] ary = "abc".split("");

//(java.lang.String[]) [, a, b, c]
Posted by: Guest on September-12-2021
-1

how to convert string into string array

public static void main(String[] args) {
    String str = "abcdef";

    String [] array = str.split(""); //   {"a", "b", "c", "d", "e", "f" }.
    
}
Posted by: Guest on May-10-2021

Code answers related to "string to array of string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language