posted 14 years ago
@swaraj
what you are trying to implement using different types is unknown to us
so please post it here
and
about line 1
that surely says that, we can compare objects of type DVDInfo
what you have written is correct , DVDInfo objects getting compared means that
we can determine whether two DVDInfo objects are equal or less than or greater than with each other on the basis of its instance variable
for example
here,
compareTo() method is called whenever we sort the array of the DVDInfo objects and that sorting order is determined using the price
hope this is clear to you now
and post your code please
hth
SCJP 6 [86%], OCPWCD [84%], OCEJPAD [83%]
If you find any post useful, click the "plus one" sign on the right