Interview Questions

Arrays are automatically cloneable

Java Interview Questions for Cloning and Cloneable


(Continued from previous question...)

Arrays are automatically cloneable

public class Main {
public static void main(String[] argv) throws Exception {
int[] ints = new int[] { 123, 234 };
int[] intsClone = (int[]) ints.clone();
}
}

(Continued on next question...)

Other Interview Questions