The String class has a useful contructor especially for this, as you can see in the following example:
 public class TestProg { public static void main(String args[]) { char [] array = {'H','e','l','l','o',',',' ','w','o','r','l','d','!' }; String s = new String(array); System.out.println(s); // prints out: Hello, world! } }
|
Further Information
Author of answer: unknown
Comments
Comments to this answer are only viewable by members. Login or become a member!
|