user82683
0
Q:

java srting array to string

char[] charArray = new char[] {'b','u','z','z'};

String answer = new String(charArray);
3
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);
   }
}
1
Arrays.toString(charArr);
0
int[] numbers = new int[]{1,2,3,4,5,6};

String arrayToString = Arrays.deepToString(numbers);
-1

New to Communities?

Join the community