char[] ca= {’a’, ’b’, ’c’}; String s=new ;
时间: 2023-11-03 17:04:34 浏览: 63
C#中的char、string和StringBuilder的使用详解
The correct way to initialize a String object using a char array is:
```java
char[] ca = {'a', 'b', 'c'};
String s = new String(ca);
```
This creates a new String object with the value "abc".
阅读全文