(a,b)=>a-b
时间: 2023-11-14 14:07:21 浏览: 103
Text A B 翻译1
(a, b) -> a - b是一个函数表达式,表示一个接受两个参数a和b的函数,返回a减去b的结果。这个函数可以被看作是一个比较器(Comparator),用于比较两个数的大小。当a大于b时,返回a-b的结果;当a小于b时,返回a-b的结果的相反数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Arrays.sort 和 冒泡排序(a, b) -> a - b](https://blog.csdn.net/bakaka9527/article/details/105588599)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [C语言:输入一个数据,如果a > b,则输出 a-b的值,并求a与b的余数;](https://blog.csdn.net/qq_54127452/article/details/119203500)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文