|
hannah2222
The difference is different, but the if() statement has little effect here, because if list1.size is used in this way, the list must be traversed every time to get its size. If the size attribute of the list is used repeatedly, it is best to First take it out and put it in the int variable. For example, there is such a statement for (;list.size;) {} It is better to use the latter method
______________
Support this, up |
|