Ankit Garg wrote:Thread wait and notify are not on the exam anymore. I have to check the objectives but I think threads are still on the exam...
jamil lusa wrote:
the answer given is like this:
Both classes do not override the toString method appropriately.
However they override it according to the rules based on which overriding should be done.
The output of this program would be something like Fir@1368a
Matthew Brown wrote:Because you can create an instance of Erode with any X, Y and Z, the uses of x, y and z in the erode() method need to be valid for any possible X, Y and Z. You know they must be a subclass of Object, but you don't know anything else. The erode() method can't know which X, Y and Z you're going to happen to use in a particular case.