This tutorial demonstrate the copyOf method. In the below listed program you will see how copyOf method is help in copy one array variable's values into a new array variable.
This tutorial demonstrate the copyOf method. In the below listed program you will see how copyOf method is help in copy one array variable's values into a new array variable.The copyOf method copies the specified array, truncating or padding with zeros so that the copy has the specified length. The result of this method allow to have the same of content in newly copied array.
import java.util.Arrays;
|