Answers for "convert array of strings to string java"

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
-1

list of string to string array in java

list.toArray(new String[0]);
Posted by: Guest on March-16-2021

Code answers related to "convert array of strings to string java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language