{"id":35203,"date":"2024-11-26T16:10:06","date_gmt":"2024-11-26T08:10:06","guid":{"rendered":"https:\/\/fwq.ai\/blog\/35203\/"},"modified":"2024-11-26T16:10:06","modified_gmt":"2024-11-26T08:10:06","slug":"java-%e4%b8%ad%ef%bc%8c%e4%b8%ba%e4%bb%80%e4%b9%88%e6%96%b9%e6%b3%95%e5%86%85%e9%83%a8%e5%af%b9%e5%bc%95%e7%94%a8%e7%b1%bb%e5%9e%8b%e5%8f%82%e6%95%b0%e7%9a%84%e4%bf%ae%e6%94%b9%e4%bc%9a%e5%bd%b1","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/35203\/","title":{"rendered":"Java \u4e2d\uff0c\u4e3a\u4ec0\u4e48\u65b9\u6cd5\u5185\u90e8\u5bf9\u5f15\u7528\u7c7b\u578b\u53c2\u6570\u7684\u4fee\u6539\u4f1a\u5f71\u54cd\u5916\u90e8\u53d8\u91cf\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173063647286541.jpg\" class=\"aligncenter\" title=\"Java \u4e2d\uff0c\u4e3a\u4ec0\u4e48\u65b9\u6cd5\u5185\u90e8\u5bf9\u5f15\u7528\u7c7b\u578b\u53c2\u6570\u7684\u4fee\u6539\u4f1a\u5f71\u54cd\u5916\u90e8\u53d8\u91cf\uff1f\u63d2\u56fe\" alt=\"Java \u4e2d\uff0c\u4e3a\u4ec0\u4e48\u65b9\u6cd5\u5185\u90e8\u5bf9\u5f15\u7528\u7c7b\u578b\u53c2\u6570\u7684\u4fee\u6539\u4f1a\u5f71\u54cd\u5916\u90e8\u53d8\u91cf\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e3a\u4ec0\u4e48\u540c\u6837\u64cd\u4f5c\uff0c\u5728\u4e00\u4e2a\u65b9\u6cd5\u4e2d\u6267\u884c\u540e\u5374\u8f93\u51fa\u7ed3\u679c\u4e0d\u540c\uff1f<\/strong><\/p>\n<p>\u5728 Java \u4e2d\uff0c\u53c2\u6570\u4f20\u9012\u7684\u65b9\u5f0f\u5206\u4e3a\u503c\u4f20\u9012\u548c\u5f15\u7528\u4f20\u9012\u3002\u5f53\u4f20\u9012\u4e00\u4e2a\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff08\u5982 int\u3001double\uff09\u65f6\uff0c\u4f1a\u8fdb\u884c\u503c\u4f20\u9012\uff0c\u5c06\u53c2\u6570\u503c\u76f4\u63a5\u590d\u5236\u7ed9\u65b9\u6cd5\u5185\u5bf9\u5e94\u7684\u53d8\u91cf\u3002<\/p>\n<p>\u5bf9\u4e8e\u5f15\u7528\u7c7b\u578b\uff08\u5982 String\uff09\uff0c\u4f20\u9012\u7684\u5374\u662f\u5bf9\u8c61\u7684\u5f15\u7528\uff0c\u800c\u4e0d\u662f\u5bf9\u8c61\u7684\u672c\u8eab\u3002\u8fd9\u610f\u5473\u7740\u65b9\u6cd5\u5185\u5bf9\u5f15\u7528\u5bf9\u8c61\u7684\u64cd\u4f5c\u5e76\u4e0d\u4f1a\u5f71\u54cd\u5230\u65b9\u6cd5\u5916\u90e8\u7684\u539f\u5bf9\u8c61\u3002<\/p>\n<p>\u5728\u7ed9\u51fa\u7684\u793a\u4f8b\u4e2d\uff0c\u7b2c\u4e00\u6b21\u64cd\u4f5c\u53d1\u751f\u5728\u65b9\u6cd5\u5916\u90e8\uff0c\u5bf9\u5b57\u7b26\u4e32\u53d8\u91cf <strong>str<\/strong> \u8fdb\u884c\u64cd\u4f5c\u3002\u7531\u4e8e str \u662f\u4e00\u4e2a\u5f15\u7528\uff0c\u56e0\u6b64\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u4e0d\u4f1a\u6539\u53d8\u539f\u6765\u7684\u5bf9\u8c61\u3002\u56e0\u6b64\uff0c<strong>str<\/strong> \u5728\u65b9\u6cd5\u5916\u4ecd\u7136\u662f &#8220;aaa&#8221;\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u7b2c\u4e8c\u6b21\u64cd\u4f5c\u53d1\u751f\u5728\u65b9\u6cd5\u5185\u90e8\uff0c\u5bf9\u53c2\u6570\u53d8\u91cf <strong>s<\/strong> \u8fdb\u884c\u4fee\u6539\u3002\u867d\u7136 <strong>s<\/strong> \u548c <strong>str<\/strong> \u6307\u5411\u540c\u4e00\u5bf9\u8c61\uff0c<strong>s<\/strong> \u7684\u4fee\u6539\u4f1a\u53cd\u6620\u5230 <strong>str<\/strong> \u4e0a\u3002\u56e0\u6b64\uff0c<strong>str<\/strong> \u5728\u65b9\u6cd5\u5916\u53d8\u6210\u4e86 &#8220;aaabbba&#8221;\u3002<\/p>\n<p>\u7531\u6b64\u53ef\u89c1\uff0c\u5bf9\u4e8e\u5f15\u7528\u7c7b\u578b\uff0c<strong>\u65b9\u6cd5\u5185\u7684\u4fee\u6539\u53ea\u5f71\u54cd\u5c40\u90e8\u53d8\u91cf\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5916\u90e8\u4f7f\u7528\u7684\u539f\u5bf9\u8c61<\/strong>\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fJava \u4e2d\uff0c\u4e3a\u4ec0\u4e48\u65b9\u6cd5\u5185\u90e8\u5bf9\u5f15\u7528\u7c7b\u578b\u53c2\u6570\u7684\u4fee\u6539\u4f1a\u5f71\u54cd\u5916\u90e8\u53d8\u91cf\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4ec0\u4e48\u540c\u6837\u64cd\u4f5c\uff0c\u5728\u4e00\u4e2a\u65b9\u6cd5\u4e2d\u6267\u884c\u540e\u5374\u8f93\u51fa\u7ed3\u679c\u4e0d\u540c\uff1f \u5728 Java \u4e2d\uff0c\u53c2\u6570\u4f20\u9012\u7684\u65b9\u5f0f\u5206\u4e3a\u503c\u4f20\u9012\u548c\u5f15\u7528\u4f20\u9012\u3002\u5f53\u4f20\u9012\u4e00\u4e2a\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff08\u5982 int\u3001double\uff09\u65f6\uff0c\u4f1a\u8fdb\u884c\u503c\u4f20\u9012\uff0c\u5c06\u53c2\u6570\u503c\u76f4\u63a5\u590d\u5236\u7ed9\u65b9\u6cd5\u5185\u5bf9\u5e94\u7684\u53d8\u91cf\u3002 \u5bf9\u4e8e\u5f15\u7528\u7c7b\u578b\uff08\u5982 String\uff09\uff0c\u4f20\u9012\u7684\u5374\u662f\u5bf9\u8c61\u7684\u5f15\u7528\uff0c\u800c\u4e0d\u662f\u5bf9\u8c61\u7684\u672c\u8eab\u3002\u8fd9\u610f\u5473\u7740\u65b9\u6cd5\u5185\u5bf9\u5f15\u7528\u5bf9\u8c61\u7684\u64cd\u4f5c\u5e76\u4e0d\u4f1a\u5f71\u54cd\u5230\u65b9\u6cd5\u5916\u90e8\u7684\u539f\u5bf9\u8c61\u3002 \u5728\u7ed9\u51fa\u7684\u793a\u4f8b\u4e2d\uff0c\u7b2c\u4e00\u6b21\u64cd\u4f5c\u53d1\u751f\u5728\u65b9\u6cd5\u5916\u90e8\uff0c\u5bf9\u5b57\u7b26\u4e32\u53d8\u91cf str \u8fdb\u884c\u64cd\u4f5c\u3002\u7531\u4e8e str \u662f\u4e00\u4e2a\u5f15\u7528\uff0c\u56e0\u6b64\u5bf9\u5176\u8fdb\u884c\u4fee\u6539\u4e0d\u4f1a\u6539\u53d8\u539f\u6765\u7684\u5bf9\u8c61\u3002\u56e0\u6b64\uff0cstr \u5728\u65b9\u6cd5\u5916\u4ecd\u7136\u662f &#8220;aaa&#8221;\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u76f8\u6bd4\u4e4b\u4e0b\uff0c\u7b2c\u4e8c\u6b21\u64cd\u4f5c\u53d1\u751f\u5728\u65b9\u6cd5\u5185\u90e8\uff0c\u5bf9\u53c2\u6570\u53d8\u91cf s \u8fdb\u884c\u4fee\u6539\u3002\u867d\u7136 s \u548c str \u6307\u5411\u540c\u4e00\u5bf9\u8c61\uff0cs \u7684\u4fee\u6539\u4f1a\u53cd\u6620\u5230 str \u4e0a\u3002\u56e0\u6b64\uff0cstr \u5728\u65b9\u6cd5\u5916\u53d8\u6210\u4e86 &#8220;aaabbba&#8221;\u3002 \u7531\u6b64\u53ef\u89c1\uff0c\u5bf9\u4e8e\u5f15\u7528\u7c7b\u578b\uff0c\u65b9\u6cd5\u5185\u7684\u4fee\u6539\u53ea\u5f71\u54cd\u5c40\u90e8\u53d8\u91cf\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5916\u90e8\u4f7f\u7528\u7684\u539f\u5bf9\u8c61\u3002 \u4ee5\u4e0a\u5c31\u662fJava \u4e2d\uff0c\u4e3a\u4ec0\u4e48\u65b9\u6cd5\u5185\u90e8\u5bf9\u5f15\u7528\u7c7b\u578b\u53c2\u6570\u7684\u4fee\u6539\u4f1a\u5f71\u54cd\u5916\u90e8\u53d8\u91cf\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-35203","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/35203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=35203"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/35203\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=35203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=35203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=35203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}