N
N
NikitaWeb2019-01-09 10:40:09
Java
NikitaWeb, 2019-01-09 10:40:09

How to copy an array of strings?

How to create a copy of arrays of strings?
5c35a54e6b7b1666135263.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
al_gon, 2019-01-09
@al_gon

String[] src = new String[]{"A", "B", "C"};
String[] dest = new String[src.length];
System.arraycopy(src, 0, dest, 0, src.length);

D
Denis Zagaevsky, 2019-01-09
@zagayevskiy

Arrays.copyOf for example. And exactly here you need an array?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question