One idea explains this whole assignment: the variable int[] a does not hold the three numbers. It holds a reference, meaning the address of an array object that lives elsewhere in memory. Everything shallow versus deep follows from that.
Why the broken copy constructor is broken
public WrapperShallow(WrapperShallow ws){ a = ws.a; }
That line copies the address, not the contents. After it runs there is still only one array in memory with two different names pointing at it. So when you change the original to 13, 14, 15, the copy reports 13, 14, 15 as well, because there is nothing separate to be left alone. That is exactly the WOOPS line in your expected output.
Why the good one works
public WrapperDeep(WrapperDeep ws){
a = new int[ws.a.length];
for(int i = 0; i < a.length; i++) a[i] = ws.a[i];
}
The new int[...] is the part that matters. It allocates a second, independent array, and only then do you copy values across one at a time. Two arrays, two sets of numbers, so changing one object cannot touch the other.
Use ws.a.length rather than a hardcoded 3. It costs nothing and the class stops being wrong the moment someone stores four elements.
A one line way to prove to yourself which kind you built
Temporarily add a method that returns (this.a == other.a). On arrays the == operator compares addresses, not contents, so it returns true for the shallow pair and false for the deep pair. I ran both versions to confirm it before posting this.
The pieces you still have to write
For toString, loop over the array and build up a string of the values. Do not return a.toString(), because arrays inherit the default version and you will get output like [I@1b6d3586 instead of your numbers.
For equals, take an Object parameter, check it with instanceof, cast it, then compare element by element and return false on the first mismatch. Watch out for the tempting shortcut of writing a == other.a inside equals. On your particular test both approaches happen to print the right WOOPS and RIGHT lines, so the test cannot tell them apart, but element by element is what equals is supposed to mean. Reference comparison would call two independent arrays holding 2, 3, 4 unequal, which is not what anyone wants.
Two things that bite people here. Your default constructor has to allocate the array before anything touches an index, otherwise the first a[0] throws a NullPointerException. And setArray as usually written, a = v, quietly reintroduces the shallow bug even inside WrapperDeep, because whoever called it still holds a reference to the array they handed you and can keep editing it behind your back. In the deep class, copy the contents of v in rather than storing v itself.
Once those are in, the trace comes out just as your sample shows: the shallow copy follows the original to 13, 14, 15 and compares equal, while the deep copy stays at 2, 3, 4 when the original becomes 7, 6, -5 and compares unequal.
If the output is not matching, print the result of that == check for both pairs first. It tells you immediately whether the problem is in your copy constructor or in your equals.