int转化成bigdecimal
时间: 2023-10-30 07:08:40 浏览: 81
string转bigdecimal类型、一行即可
5星 · 资源好评率100%
要将int转换为BigDecimal,可以使用以下方法:
int a = 10;
BigDecimal bigDecimal = new BigDecimal(a);
在这个例子中,我们将整数10转换为BigDecimal类型的变量bigDecimal。
#### 引用[.reference_title]
- *1* [【Java】BigDecimal和String,BigDecimal和Int的类型转换](https://blog.csdn.net/superone52033/article/details/128873543)[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^insertT0,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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [BigDecimal 转换为int 或者其他类型](https://blog.csdn.net/qq_33210042/article/details/110491485)[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^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文