Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EjercicioArrays {
- public static void main(String[] args) {
- int[] arrayInts = {1, 2, 3, 4, 5};
- int[] arrayInts2 = new int[arrayInts.length];
- for (int i = 0; i < arrayInts.length; i++) {
- arrayInts2[i] = arrayInts[i];
- }
- arrayInts[0] = -1;
- printArray(arrayInts);
- printArray(arrayInts2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement