Answers for "writer to string array java"

1

string to string array java

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

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

java string array to one string

public class ArrayOfStrings {
   public static void main(String args[]) {
      String stringArray[] = {"Hello ", " how", " are", " you", " welcome", " to", " Tutorialspoint"};
      StringBuffer sb = new StringBuffer();
      for(int i = 0; i < stringArray.length; i++) {
         sb.append(stringArray[i]);
      }
      String str = sb.toString();
      System.out.println(str);
   }
}
Posted by: Guest on July-17-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language