Question: 4) Consider this code that creates some Location objects with coordinates x-10 and y 20 Location a, b, c; a = new Location( 10,20) b

4) Consider this code that creates some Location objects with coordinates x-10 and y 20 Location a, b, c; a = new Location( 10,20) b = new Location( 10,20); After this code executes, what are the values of these bgolean expressions? a) a=- b) aequals(b) c) a=-u d) a equals(c) f) b.eguals(c) Also, explain the difference between = and the equals method for the Location class 5) Write a code fragment (in Java) that creates an array 50 integers, and initializes each cell to the same value as its index number (i.e. [0] = 0, [1] = 1, etc.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
