Answers for "make a string to an string array"

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 "make a string to an string array"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language