public class ArrayError {
public static void main(String[] args) {
int[] first = new int[2];
first[0] = 3;
first[1] = 7;
int[] second = new int[2];
What is the bug in computer?
first = [ 3,7 ]
second = [ 3 , 7]
They contains the same elements.
Process finished with exit code 0.
Learn more about bug
brainly.com/question/24124347
#SPJ4
The complete question is -
What is wrong with the following code? Correct the bugs to produce the following expected output: first = [3, 7] second = [3, 7] They contain the same elements. lype your solution here: 1 int[] first new int [2]; 2 first [0] 3; 3 first [1] 7; 4 int [ ] second = new int [2]; 5 second [0] = 3; 6 second [1] = 7; 8// print the array elements 9 System.out.println("first" first); 10 System.out.println("second"second); 12 // see if the elements are the same 13 if (first - second) I 14 System.out.println("They contain the same elements."); 15 else 16 System.out.println("The elements are different."); 17 h