2 ms·
Yes. In fact, both String.valueOf(char[]) and constructor String(char[]) are already documented as copying the array contents.
by orra 3y ago
Yes. In fact, both String.valueOf(char[]) and constructor String(char[]) are already documented as copying the array contents.