{"id":102,"date":"2023-02-18T06:42:00","date_gmt":"2023-02-17T22:42:00","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=102"},"modified":"2023-02-18T06:42:15","modified_gmt":"2023-02-17T22:42:15","slug":"string-bigdecimal-conversion","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/18\/string-bigdecimal-conversion\/","title":{"rendered":"String\u4e0eBigDecimal\u4e92\u8f6c"},"content":{"rendered":"<h2>String \u8f6c BigDecimal<\/h2>\n<pre><code class=\"language-java\">public static void main(String[] args) {\n    String s = &quot;15.25&quot;;\n    \/\/\u65b9\u5f0f\u4e00\n    BigDecimal bigDecimal = new BigDecimal(s);\n    \/\/\u65b9\u5f0f\u4e8c\n    BigDecimal bigDecimal1 = NumberUtils.createBigDecimal(s);\n}<\/code><\/pre>\n<h2>BigDecimal \u8f6c String<\/h2>\n<pre><code class=\"language-java\">public static void main(String[] args) {\n    BigDecimal bigDecimal = new BigDecimal(15.55);\n\n    String s = bigDecimal.toString();\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>String \u8f6c BigDecimal public static void main(String[] ar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-java-basic"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}