Lec 5 - Passing Object in Java
Lec 5 - Passing Object in Java
PRIMITIVE PARAMETERS
6. }
compared.
All objects have an equals method.
9-
17
THE EQUALS METHOD
Instead of using the == operator to compare
two Stock objects, we should use the equals
method.
public boolean equals(Stock object2)
{
boolean status;