System.currentTimeMillis() / 1000': 浮点上下文中的整数除法
时间: 2023-10-25 08:26:30 浏览: 118
System.currentTimeMillis()用于获取当前时间的毫秒数,而除以1000是为了将毫秒数转换为秒数。这个操作是在浮点上下文中进行的整数除法。在计算机中,整数除法会取整数的商,舍弃小数部分。因此,System.currentTimeMillis() / 1000会得到当前时间的秒数。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [JAVA基础复习专栏](https://blog.csdn.net/qq_41842605/article/details/106560029)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [System.currentTimeMillis()计算方式与时间的单位转换详解](https://download.csdn.net/download/weixin_38651812/12725398)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [java学习笔记(13) 第13章 - 常用类](https://blog.csdn.net/m0_50736744/article/details/121615761)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文