Home > Back-end >  Small white for help, hope to be able to explain some code
Small white for help, hope to be able to explain some code

Time:09-24

Especially the ss. The num is something, which come of, and name.com pareTo (ss) name) this line is

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 instances
Name.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 attribute
Name.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 attribute
Name.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 place

CodePudding user response:

Knot posted rate to zero
  • Related