final char[] charArray = { 'g','e','e','k','s','f','o','r','g','e','e','k','s' }; String string = new String(charArray); System.out.println(string); // -> "geeksforgeeks"