int转BigDecimal
时间: 2023-08-20 18:12:33 浏览: 120
int转换为BigDecimal可以使用BigDecimal的valueOf方法。例如,你可以使用以下代码将int类型的值转换为BigDecimal类型的值:
int value = 10;
BigDecimal number = BigDecimal.valueOf(value);
这样,变量number就是一个BigDecimal类型的值,其值为10。
#### 引用[.reference_title]
- *1* [int与bigdecimal的相互转换](https://blog.csdn.net/qq_40180411/article/details/82695203)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [int转换bigdecimal](https://blog.csdn.net/danruoshui315/article/details/44861763)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [BigDecimal 转 String](https://blog.csdn.net/u012829124/article/details/97621028)[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^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文