Character Array to String

public class stringexp1 {


public static void main(String[] args) {


char arr[]={'J','A','V','A'};

String s=new String(arr,0,4);

System.out.println(s);
}

}

Output:

JAVA

No comments:

Post a Comment