Look at the following code. (You might want to review the Stock class presented earlier in this

Question:

Look at the following code. (You might want to review the Stock class presented earlier in this chapter.) 

Stock stock1 = new Stock("XYZ", 9.65);
Stock stock2 = new Stock("SUNW", 7.92);

While the equals method is executing as a result of the following statement, what object does this reference?

If (stock2.equals(stock1))
 System.out.println("The stocks are the same."); 

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: