string类型转换bigdecimal
时间: 2023-10-02 15:10:29 浏览: 91
string转bigdecimal类型、一行即可
5星 · 资源好评率100%
要将String类型转换为BigDecimal类型,可以使用BigDecimal的构造方法。首先,将String类型的变量赋值给一个String类型的变量,例如:String str = "xxx"。然后,使用BigDecimal的构造方法,将这个String类型的变量作为参数传入,实例化一个BigDecimal对象,例如:BigDecimal bd = new BigDecimal(str)。这样就成功将String类型转换为BigDecimal类型了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [String类型转成bigdecimal类型](https://blog.csdn.net/DCBTB/article/details/52368052)[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* [Java String类型和BigDecimal类型之间的转化及BigDecimal类型的介绍](https://blog.csdn.net/m0_57613893/article/details/121625034)[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 ]
阅读全文