How do you set one array’s values to another array’s values in Java?

You may want to use clone:

a = b.clone();

or use arraycopy(Object source, int sourcePosition, Object destination, int destinationPosition, int numberOfElements)

System.arraycopy(b, 0, a, 0, b.length());

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)