{"id":1621,"date":"2025-03-16T00:10:37","date_gmt":"2025-03-15T16:10:37","guid":{"rendered":"http:\/\/codermr.com\/?p=1621"},"modified":"2025-03-23T15:17:36","modified_gmt":"2025-03-23T07:17:36","slug":"%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/","title":{"rendered":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u5f85\u5b8c\u5584\u3002<\/h1>\n\n\n\n<p><code>BigDecimal<\/code>\u00a0\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u907f\u514d\u4e86\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u95ee\u9898\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1)&nbsp;<strong>\u5341\u8fdb\u5236\u5b58\u50a8<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u5185\u90e8\u4f7f\u7528\u4e00\u4e2a&nbsp;<strong>\u6574\u6570\u6570\u7ec4<\/strong>\uff08<code>int[]<\/code>\uff09\u6765\u8868\u793a\u6570\u5b57\u7684\u6bcf\u4e00\u4f4d\uff0c\u5e76\u901a\u8fc7\u4e00\u4e2a&nbsp;<strong>\u6307\u6570<\/strong>\uff08<code>scale<\/code>\uff09\u6765\u8868\u793a\u5c0f\u6570\u70b9\u7684\u4f4d\u7f6e\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li>\u6570\u5b57\u00a0<code>123.45<\/code>\u00a0\u53ef\u4ee5\u8868\u793a\u4e3a\uff1a\n<ul>\n<li>\u6574\u6570\u6570\u7ec4\uff1a<code>[1, 2, 3, 4, 5]<\/code><\/li>\n\n\n\n<li>\u6307\u6570\uff08<code>scale<\/code>\uff09\uff1a<code>2<\/code>\uff08\u8868\u793a\u5c0f\u6570\u70b9\u540e\u6709 2 \u4f4d\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u5f0f\u907f\u514d\u4e86\u4e8c\u8fdb\u5236\u8868\u793a\u7684\u7cbe\u5ea6\u95ee\u9898\uff0c\u56e0\u4e3a&nbsp;<code>BigDecimal<\/code>&nbsp;\u76f4\u63a5\u4ee5\u5341\u8fdb\u5236\u5f62\u5f0f\u5b58\u50a8\u6570\u5b57\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(2)&nbsp;<strong>\u7cbe\u786e\u8fd0\u7b97<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u7684\u8fd0\u7b97\uff08\u5982\u52a0\u3001\u51cf\u3001\u4e58\u3001\u9664\uff09\u662f\u57fa\u4e8e\u6574\u6570\u8fd0\u7b97\u5b9e\u73b0\u7684\u3002\u4f8b\u5982\uff0c\u52a0\u6cd5\u662f\u901a\u8fc7\u5bf9\u9f50\u5c0f\u6570\u70b9\u540e\u9010\u4f4d\u76f8\u52a0\uff0c\u518d\u8c03\u6574\u6307\u6570\u6765\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u65b9\u5f0f\u786e\u4fdd\u4e86\u8fd0\u7b97\u7684\u7cbe\u786e\u6027\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(3)&nbsp;<strong>\u53ef\u914d\u7f6e\u7684\u820d\u5165\u6a21\u5f0f<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u63d0\u4f9b\u4e86\u591a\u79cd\u820d\u5165\u6a21\u5f0f\uff08\u5982&nbsp;<code>ROUND_HALF_UP<\/code>\u3001<code>ROUND_DOWN<\/code>&nbsp;\u7b49\uff09\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u9700\u8981\u9009\u62e9\u820d\u5165\u65b9\u5f0f\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u7cbe\u5ea6\u635f\u5931\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(4)&nbsp;<strong>\u4efb\u610f\u7cbe\u5ea6<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u652f\u6301\u4efb\u610f\u7cbe\u5ea6\u7684\u6570\u5b57\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8c03\u6574\u6570\u5b57\u7684\u4f4d\u6570\uff0c\u9002\u5408\u9ad8\u7cbe\u5ea6\u8ba1\u7b97\u573a\u666f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.&nbsp;<strong>\u6e90\u7801\u89e3\u6790<\/strong><\/h3>\n\n\n\n<p>\u4ee5\u4e0b\u662f&nbsp;<code>BigDecimal<\/code>&nbsp;\u7684\u90e8\u5206\u6e90\u7801\uff0c\u5e2e\u52a9\u6211\u4eec\u7406\u89e3\u5176\u5b9e\u73b0\u539f\u7406\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1)&nbsp;<strong>\u5185\u90e8\u8868\u793a<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u7684\u6838\u5fc3\u5b57\u6bb5\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>java<\/p>\n\n\n\n<p>\u590d\u5236<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public class BigDecimal extends Number implements Comparable&lt;BigDecimal&gt; {\n    private final BigInteger intVal; \/\/ \u5b58\u50a8\u6574\u6570\u503c\n    private final int scale;        \/\/ \u5c0f\u6570\u70b9\u540e\u7684\u4f4d\u6570\n    private transient int precision; \/\/ \u6570\u5b57\u7684\u7cbe\u5ea6\uff08\u603b\u4f4d\u6570\uff09\n    \/\/ \u5176\u4ed6\u5b57\u6bb5\u548c\u65b9\u6cd5...\n}<\/pre>\n\n\n\n<ul>\n<li><code>intVal<\/code>\uff1a\u5b58\u50a8\u6570\u5b57\u7684\u6574\u6570\u90e8\u5206\u3002<\/li>\n\n\n\n<li><code>scale<\/code>\uff1a\u8868\u793a\u5c0f\u6570\u70b9\u540e\u7684\u4f4d\u6570\u3002<\/li>\n\n\n\n<li><code>precision<\/code>\uff1a\u8868\u793a\u6570\u5b57\u7684\u603b\u4f4d\u6570\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(2)&nbsp;<strong>\u52a0\u6cd5\u5b9e\u73b0<\/strong><\/h4>\n\n\n\n<p>\u4ee5\u4e0b\u662f&nbsp;<code>BigDecimal<\/code>&nbsp;\u52a0\u6cd5\u7684\u6838\u5fc3\u903b\u8f91\uff08\u7b80\u5316\u7248\uff09\uff1a<\/p>\n\n\n\n<p>java<\/p>\n\n\n\n<p>\u590d\u5236<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public BigDecimal add(BigDecimal augend) {\n    \/\/ \u5bf9\u9f50\u5c0f\u6570\u70b9\n    long xs = this.intVal; \/\/ \u5f53\u524d\u503c\n    long ys = augend.intVal; \/\/ \u52a0\u6570\n    int scale = Math.max(this.scale, augend.scale); \/\/ \u5bf9\u9f50\u540e\u7684 scale\n\n    \/\/ \u8c03\u6574\u5c0f\u6570\u70b9\u540e\u76f8\u52a0\n    long sum = xs + ys;\n    return new BigDecimal(sum, scale);\n}<\/pre>\n\n\n\n<ul>\n<li>\u9996\u5148\u5bf9\u9f50\u4e24\u4e2a\u6570\u7684\u5c0f\u6570\u70b9\u3002<\/li>\n\n\n\n<li>\u7136\u540e\u5bf9\u6574\u6570\u90e8\u5206\u8fdb\u884c\u52a0\u6cd5\u8fd0\u7b97\u3002<\/li>\n\n\n\n<li>\u6700\u540e\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684\u00a0<code>BigDecimal<\/code>\u00a0\u5bf9\u8c61\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(3)&nbsp;<strong>\u6784\u9020\u65b9\u6cd5<\/strong><\/h4>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u63d0\u4f9b\u4e86\u591a\u79cd\u6784\u9020\u65b9\u6cd5\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<p>java<\/p>\n\n\n\n<p>\u590d\u5236<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public BigDecimal(String val) {\n    \/\/ \u89e3\u6790\u5b57\u7b26\u4e32\uff0c\u521d\u59cb\u5316 intVal \u548c scale\n    this.intVal = new BigInteger(val.replace(\".\", \"\"));\n    this.scale = val.contains(\".\") ? val.length() - val.indexOf(\".\") - 1 : 0;\n}<\/pre>\n\n\n\n<ul>\n<li>\u901a\u8fc7\u5b57\u7b26\u4e32\u6784\u9020\u00a0<code>BigDecimal<\/code>\uff0c\u53ef\u4ee5\u907f\u514d\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u95ee\u9898\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4.&nbsp;<strong>\u793a\u4f8b\u4ee3\u7801<\/strong><\/h3>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528&nbsp;<code>BigDecimal<\/code>&nbsp;\u7684\u793a\u4f8b\uff1a<\/p>\n\n\n\n<p>java<\/p>\n\n\n\n<p>\u590d\u5236<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import java.math.BigDecimal;\n\npublic class BigDecimalExample {\n    public static void main(String[] args) {\n        BigDecimal a = new BigDecimal(\"0.1\");\n        BigDecimal b = new BigDecimal(\"0.2\");\n        BigDecimal sum = a.add(b);\n        System.out.println(sum); \/\/ \u8f93\u51fa 0.3\n    }\n}<\/pre>\n\n\n\n<ul>\n<li>\u901a\u8fc7\u5b57\u7b26\u4e32\u521d\u59cb\u5316\u00a0<code>BigDecimal<\/code>\uff0c\u786e\u4fdd\u00a0<code>0.1<\/code>\u00a0\u548c\u00a0<code>0.2<\/code>\u00a0\u7684\u7cbe\u786e\u8868\u793a\u3002<\/li>\n\n\n\n<li>\u4f7f\u7528\u00a0<code>add<\/code>\u00a0\u65b9\u6cd5\u8fdb\u884c\u52a0\u6cd5\u8fd0\u7b97\uff0c\u7ed3\u679c\u7cbe\u786e\u65e0\u8bef\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5.&nbsp;<strong>\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p><code>BigDecimal<\/code>&nbsp;\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5b9e\u73b0\u7cbe\u786e\u8ba1\u7b97\uff1a<\/p>\n\n\n\n<ol start=\"1\">\n<li><strong>\u5341\u8fdb\u5236\u5b58\u50a8<\/strong>\uff1a\u4f7f\u7528\u6574\u6570\u6570\u7ec4\u548c\u6307\u6570\u8868\u793a\u6570\u5b57\uff0c\u907f\u514d\u4e8c\u8fdb\u5236\u8868\u793a\u7684\u7cbe\u5ea6\u95ee\u9898\u3002<\/li>\n\n\n\n<li><strong>\u7cbe\u786e\u8fd0\u7b97<\/strong>\uff1a\u57fa\u4e8e\u6574\u6570\u8fd0\u7b97\u5b9e\u73b0\u52a0\u51cf\u4e58\u9664\uff0c\u786e\u4fdd\u7ed3\u679c\u7cbe\u786e\u3002<\/li>\n\n\n\n<li><strong>\u53ef\u914d\u7f6e\u820d\u5165\u6a21\u5f0f<\/strong>\uff1a\u63d0\u4f9b\u591a\u79cd\u820d\u5165\u65b9\u5f0f\uff0c\u6ee1\u8db3\u4e0d\u540c\u573a\u666f\u9700\u6c42\u3002<\/li>\n\n\n\n<li><strong>\u9ad8\u7cbe\u5ea6\u652f\u6301<\/strong>\uff1a\u652f\u6301\u4efb\u610f\u7cbe\u5ea6\u7684\u6570\u5b57\uff0c\u9002\u5408\u9ad8\u7cbe\u5ea6\u8ba1\u7b97\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u5f85\u5b8c\u5584\u3002 BigDecimal\u00a0\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u907f\u514d\u4e86\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u95ee\u9898\uff1a (1)&nbsp;\u5341\u8fdb\u5236\u5b58\u50a8 BigDe&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/\u5f85\u5b8c\u5584\u2588bigdecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u5f85\u5b8c\u5584\u3002 BigDecimal\u00a0\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u907f\u514d\u4e86\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u95ee\u9898\uff1a (1)&nbsp;\u5341\u8fdb\u5236\u5b58\u50a8 BigDe...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/\u5f85\u5b8c\u5584\u2588bigdecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-15T16:10:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-23T07:17:36+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/codermr.com\/wp-content\/uploads\/2025\/03\/bigdecimal1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"665\" \/>\n\t<meta property=\"og:image:height\" content=\"655\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u7801\u5148\u751f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/mrcode2021\" \/>\n<meta name=\"twitter:site\" content=\"@mrcode2021\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7801\u5148\u751f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/\"},\"author\":{\"name\":\"\u7801\u5148\u751f\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"headline\":\"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\",\"datePublished\":\"2025-03-15T16:10:37+00:00\",\"dateModified\":\"2025-03-23T07:17:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/\"},\"wordCount\":34,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"articleSection\":[\"JAVA\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/\",\"url\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/\",\"name\":\"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/#website\"},\"datePublished\":\"2025-03-15T16:10:37+00:00\",\"dateModified\":\"2025-03-23T07:17:36+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/codermr.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/codermr.com\/#website\",\"url\":\"http:\/\/codermr.com\/\",\"name\":\"\u7801\u5148\u751f\u7684\u535a\u5ba2\",\"description\":\"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP\",\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/codermr.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\",\"name\":\"\u7801\u5148\u751f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"contentUrl\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"width\":400,\"height\":400,\"caption\":\"\u7801\u5148\u751f\"},\"logo\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/codermr.com\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021\"],\"url\":\"http:\/\/codermr.com\/index.php\/author\/coderma\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/\u5f85\u5b8c\u5584\u2588bigdecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2","og_description":"\u5f85\u5b8c\u5584\u3002 BigDecimal\u00a0\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u907f\u514d\u4e86\u6d6e\u70b9\u6570\u7684\u7cbe\u5ea6\u95ee\u9898\uff1a (1)&nbsp;\u5341\u8fdb\u5236\u5b58\u50a8 BigDe...","og_url":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/\u5f85\u5b8c\u5584\u2588bigdecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f\/","og_site_name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","article_published_time":"2025-03-15T16:10:37+00:00","article_modified_time":"2025-03-23T07:17:36+00:00","og_image":[{"width":665,"height":655,"url":"http:\/\/codermr.com\/wp-content\/uploads\/2025\/03\/bigdecimal1.png","type":"image\/png"}],"author":"\u7801\u5148\u751f","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/mrcode2021","twitter_site":"@mrcode2021","twitter_misc":{"\u4f5c\u8005":"\u7801\u5148\u751f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#article","isPartOf":{"@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/"},"author":{"name":"\u7801\u5148\u751f","@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"headline":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f","datePublished":"2025-03-15T16:10:37+00:00","dateModified":"2025-03-23T07:17:36+00:00","mainEntityOfPage":{"@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/"},"wordCount":34,"commentCount":0,"publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"articleSection":["JAVA"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/","url":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/","name":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f - \u7801\u5148\u751f\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/codermr.com\/#website"},"datePublished":"2025-03-15T16:10:37+00:00","dateModified":"2025-03-23T07:17:36+00:00","breadcrumb":{"@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/codermr.com\/index.php\/2025\/03\/16\/%e5%be%85%e5%ae%8c%e5%96%84%e2%96%88bigdecimal%e4%b8%ba%e4%bb%80%e4%b9%88%e8%83%bd%e7%b2%be%e7%a1%ae%e7%9a%84%e8%bf%9b%e8%a1%8c%e5%b0%8f%e6%95%b0%e8%ae%a1%e7%ae%97%ef%bc%9f\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/codermr.com\/"},{"@type":"ListItem","position":2,"name":"\u5f85\u5b8c\u5584\u3002\u3002\u2588BigDecimal\u4e3a\u4ec0\u4e48\u80fd\u7cbe\u786e\u7684\u8fdb\u884c\u5c0f\u6570\u8ba1\u7b97\uff1f"}]},{"@type":"WebSite","@id":"http:\/\/codermr.com\/#website","url":"http:\/\/codermr.com\/","name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","description":"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP","publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/codermr.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf","name":"\u7801\u5148\u751f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/","url":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","contentUrl":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","width":400,"height":400,"caption":"\u7801\u5148\u751f"},"logo":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/codermr.com","https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021"],"url":"http:\/\/codermr.com\/index.php\/author\/coderma\/"}]}},"_links":{"self":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1621"}],"collection":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/comments?post=1621"}],"version-history":[{"count":3,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1621\/revisions"}],"predecessor-version":[{"id":1676,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1621\/revisions\/1676"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media\/1622"}],"wp:attachment":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media?parent=1621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/categories?post=1621"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/tags?post=1621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}