Char Array To String - Java Language Basics

Java examples for Language Basics:char

Description

Char Array To String

Demo Code

public class Main {
       /*from  w  w w .j  av  a  2s .  com*/
        public static void main(String args[]){
               
                char[] charArray = new char[]{'J','a','v','a'};
               
                String str = new String(charArray);
               
                System.out.println("Char array converted to String: " + str);
        }
}

Result


Related Tutorials