CodePudding user response:
Ss. Num ss refers to call this the Teacher instance num attribute of ss is to call the Teacher in the class compareTo method passed Object (Object o) o and cast to the Teacher class instancesName.com pareTo (ss. Name) is for the current instance name attribute and ss of the name object instance comparison the results returned to the name of the ASCII - ss. The name of the ASCII
CodePudding user response:
The Teacher ss=(the Teacher) o; Is the parameters of the incoming object o to the Teacher and ss. The num is the object of the Teacher's num attributeName.com pareTo (ss. Name) is to use the current this reference object of the Teacher's name attribute and ss reference object of the Teacher the name attribute of the comparison, the name attribute is a String object, compareTo method is the method of the String,
CodePudding user response:
The Teacher ss=(the Teacher) o; Is the parameters of the incoming object o to the Teacher and ss. The num is the object of the Teacher's num attributeName.com pareTo (ss. Name) is to use the current this reference object of the Teacher's name attribute and ss reference object of the Teacher the name attribute of the comparison, the name attribute is a String object, compareTo method is the method of the String,
CodePudding user response:
Explain very in placeCodePudding user response:
Knot posted rate to zero