{"id":1000,"date":"2018-11-22T15:02:18","date_gmt":"2018-11-22T06:02:18","guid":{"rendered":"https:\/\/vongg.com\/?p=1000"},"modified":"2018-11-22T15:04:36","modified_gmt":"2018-11-22T06:04:36","slug":"java%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88_%ef%bd%8a%ef%bd%96%ef%bd%8d%e5%86%85%e9%83%a8%e8%a9%b3%e7%b4%b0%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/vongg.com\/?p=1000","title":{"rendered":"java\u30b3\u30e1\u30f3\u30c8_\uff2a\uff36\uff2d\u5185\u90e8\u8a73\u7d30\u5206\u6790"},"content":{"rendered":"<table style=\"height: 1121px;\" width=\"913\">\n<tbody>\n<tr>\n<td width=\"69\">java\u547d\u4ee4<\/td>\n<td width=\"72\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/blog.csdn.net\/huaweitman\/article\/details\/78122723\">http:\/\/blog.csdn.net\/huaweitman\/article\/details\/78122723<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">Java\u547d\u4ee4\u5b66\u4e60\u7cfb\u5217<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/www.hollischuang.com\/archives\/tag\/java%E5%91%BD%E4%BB%A4%E5%AD%A6%E4%B9%A0%E7%B3%BB%E5%88%97\">http:\/\/www.hollischuang.com\/archives\/tag\/java%E5%91%BD%E4%BB%A4%E5%AD%A6%E4%B9%A0%E7%B3%BB%E5%88%97<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><strong>jhat<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><strong>\u529f\u80fd<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\u4e00\u822c\u4e0ejmap\u642d\u914d\u4f7f\u7528\uff0c\u7528\u6765\u5206\u6790jmap\u751f\u6210\u7684\u5806\u8f6c\u50a8\u6587\u4ef6\u3002<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>\u7531\u4e8e\u6709\u5f88\u591a\u53ef\u89c6\u5316\u5de5\u5177\uff08Eclipse Memory Analyzer \u3001IBM HeapAnalyzer\uff09\u53ef\u4ee5\u66ff\u4ee3\uff0c\u6240\u4ee5\u5f88\u5c11\u7528\u3002\u4e0d\u8fc7\u5728\u6ca1\u6709\u53ef\u89c6\u5316\u5de5\u5177\u7684\u673a\u5668\u4e0a\u4e5f\u662f\u53ef\u7528\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><strong>\u5e38\u7528\u6307\u4ee4<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>jmap -dump:format=b,file=heapDump 3331\u00a0+\u00a0jhat heapDump\uff1a\u89e3\u6790Java\u5806\u8f6c\u50a8\u6587\u4ef6,\u5e76\u542f\u52a8\u4e00\u4e2a web server<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\u30d2\u30fc\u30d7\u30c0\u30f3\u30d7\u3092Eclipse Memory Analyzer\u3067\u89e3\u6790\u3057\u3088\u3046\uff01<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/tech.furyu.jp\/blog\/?p=3554\">http:\/\/tech.furyu.jp\/blog\/?p=3554<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"https:\/\/www.eclipse.org\/mat\/\">https:\/\/www.eclipse.org\/mat\/<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><strong>jcnsole<\/strong><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>jvisualvm<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"https:\/\/visualvm.github.io\/index.html\">https:\/\/visualvm.github.io\/index.html<\/a><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>Eclipse Memory Analyzer<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>IBM HeapAnalyzer \u4f7f\u7528\u65b9\u6cd5<\/strong><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"https:\/\/www.ibm.com\/developerworks\/community\/wikis\/home?lang=en#!\/wiki\/W3b463571efc8_4f02_99af_3cbc0da42ddc\/page\/IBM%20HeapAnalyzer%20Information\">https:\/\/www.ibm.com\/developerworks\/community\/wikis\/home?lang=en#!\/wiki\/W3b463571efc8_4f02_99af_3cbc0da42ddc\/page\/IBM%20HeapAnalyzer%20Information<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/jinwooh.wixsite.com\/java\">http:\/\/jinwooh.wixsite.com\/java<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td>java -Xmx1000m -jar D:\\00_tool\\IBM_HeapAnalyzer.jar<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\u5982\u4f55\u7cbe\u786e\u5730\u6d4b\u91cfjava\u5bf9\u8c61\u7684\u5927\u5c0f<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/blog.csdn.net\/xorxos\/article\/details\/51707746\">http:\/\/blog.csdn.net\/xorxos\/article\/details\/51707746<\/a><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">java\u865a\u62df\u673a\u89c4\u8303(java se 7\u7248) pdf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"height: 52px;\" width=\"630\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"144\">\u7ebf\u7a0bDump\u7684\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><a href=\"http:\/\/www.hollischuang.com\/archives\/110\">http:\/\/www.hollischuang.com\/archives\/110<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>\uff23\uff4c\uff41\uff53\uff53\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3067\uff2a\uff41\uff56\uff41\u306e\u3044\u308d\u3044\u308d\u306a\u6982\u5ff5\u3092\u7406\u89e3\u3059\u308b\u3002<\/p>\n<p>Java\u5b57\u8282\u7801\u751f\u6210\u5f00\u6e90\u6846\u67b6\u4ecb\u7ecd&#8211;Javassist\uff1a<br \/>\nclass\u6587\u4ef6\u7528jd-gui\u3067\u898b\u308c\u308b\u3002<\/p>\n<p>\u8fd9\u4e2a\u8fd0\u884c\u65f6\u751f\u6210\u7684\u52a8\u6001\u4ee3\u7406\u5bf9\u8c61\u662f\u53ef\u4ee5\u5bfc\u51fa\u5230\u6587\u4ef6\u7684\uff0c\u65b9\u6cd5\u6709\u4e24\u79cd<\/p>\n<p>1. \u5728\u4ee3\u7801\u4e2d\u52a0\u5165System.setProperty(&#8220;sun.misc.ProxyGenerator.saveGeneratedFiles&#8221;, &#8220;true&#8221;);<br \/>\n2. \u5728\u8fd0\u884c\u65f6\u52a0\u5165jvm \u53c2\u6570 -Dsun.misc.ProxyGenerator.saveGeneratedFiles=true<\/p>\n<p>java \u30b3\u30de\u30f3\u30c9\u306e\u5f8c\u308d\u306b\u3000-verbose:class \u3067\uff23\uff4c\uff41\uff53\uff53\u306e\uff2c\uff4f\uff41\uff44\u60c5\u5831\u304c\u8868\u793a\u3067\u304d\u308b\u3002<\/p>\n<p>\u88c5\u8f7d\u65f6\u673a\u4e0e\u65b9\u5f0f<br \/>\n\u8bfb\u8005\u53ef\u4ed4\u7ec6\u67e5\u770b\u4e24\u8005\u7684\u533a\u522b\uff0c\u53ef\u4ee5\u53d1\u73b0\u53ea\u6709\u5f53 \u7c7bA \u88ab\u4f7f\u7528\u65f6\uff0c\u8be5\u7c7b\u5bf9\u5e94\u7684 A.class \u624d\u4f1a\u88ab\u88c5\u8f7d\u3002\u603b\u7ed3\u8d77\u6765\uff0c\u4e00\u4e2a\u7c7b\u7684\u52a0\u8f7d\u6761\u4ef6\u662f\uff1a<br \/>\n1. \u5f53\u4f7f\u7528 new \u64cd\u4f5c\u7b26\u6267\u884c\u67d0\u7c7b\u65f6\u3002\u6bd4\u5982 SomeClass some = new SomeClass()\u3002<br \/>\n2. \u5f53\u5df2\u52a0\u8f7d\u7c7b\u4e2d\u6709\u4e00\u4e2a\u9759\u6001\u5f15\u7528\u6307\u5411\u67d0\u7c7b\u65f6\u3002 \u6bd4\u5982 System.out \u3002<br \/>\n\u521d\u59cb\u5316\u65f6\u673a\u4e0e\u65b9\u5f0f<br \/>\n\u5728Java\u4e2d\uff0c\u4e00\u4e2a\u7c7b\u88ab\u52a0\u8f7d\u5b8c\u6bd5\u540e\uff0c\u4e0d\u4f1a\u7acb\u5373\u6267\u884c\u7c7b\u7684\u521d\u59cb\u5316\u5de5\u4f5c\u3002\u5f53\u7c7b\u4e2d\u7684\u7b26\u53f7\u88ab\u7b2c\u4e00\u6b21\u4f7f\u7528\u65f6\uff0c\u8be5\u7c7b\u624d\u5f00\u59cb\u88ab\u521d\u59cb\u5316\u3002<br \/>\n\u5728\u521d\u59cb\u5316\u987a\u5e8f\u65b9\u9762\uff1aJVM\u4f1a\u9996\u5148\u5b8c\u6210\u7236\u7c7b\u7684\u521d\u59cb\u5316\uff0c\u518d\u6267\u884c\u5b50\u7c7b\u7684\u521d\u59cb\u5316\uff1b\u5bf9\u4e8e\u7c7b\u4e2d\u9759\u6001\u7684\u5e38\u91cf\uff0c\u4f1a\u6309\u7167\u5b9a\u4e49\u7684\u5148\u540e\u987a\u5e8f\u5b8c\u6210\u521d\u59cb\u5316\uff1b\u6700\u540e\u4f1a\u4fdd\u8bc1\u5728\u521d\u59cb\u5316\u4e4b\u524d\uff0c\u6bcf\u4e2a\u5c5e\u6027\u90fd\u4f1a\u6709\u4e00\u4e2a\u9ed8\u8ba4\u503c<\/p>\n<p>JVM \u5982\u4f55\u88c5\u8f7d\u548c\u521d\u59cb\u5316\u4e00\u4e2aJava class(\u7c7b)\u00a0\u00a0\u00a0\u00a0http:\/\/www.tiantianbianma.com\/jvm-load-class.html\/<br \/>\n\u6df1\u5165\u5206\u6790Java\u7684HelloWorld\u7a0b\u5e8f\u00a0\u00a0\u00a0\u00a0http:\/\/www.tiantianbianma.com\/java-helloworld.html\/<br \/>\n\u6df1\u5165\u5206\u6790Java\u89c4\u8303\u4e2dJVM\u7684\u5185\u5b58\u5e03\u5c40\u6a21\u578b\u00a0\u00a0\u00a0\u00a0http:\/\/www.tiantianbianma.com\/jvm-memory.html\/<br \/>\nJava\u7a0b\u5e8f\u5458\u7684\u6280\u672f\u8fdb\u9636\u6210\u957f\u8def\u7ebf\u00a0\u00a0\u00a0\u00a0http:\/\/www.tiantianbianma.com\/java-study-guide.html\/<\/p>\n<p>\u6df1\u5165\u7406\u89e3Java\u4e2d\u4e3a\u4ec0\u4e48\u5185\u90e8\u7c7b\u53ef\u4ee5\u8bbf\u95ee\u5916\u90e8\u7c7b\u7684\u6210\u5458 \u00a0\u00a0\u00a0\u00a0\u00a0http:\/\/blog.csdn.net\/zhangjg_blog\/article\/details\/20000769<\/p>\n<p>Java\u77e5\u8bc6\u70b9\u603b\u7ed3\u7bc7\uff1aJava\u7684\u5185\u5b58\u6a21\u578b\u3001\u7ebf\u7a0b\u5b89\u5168\u3001\u8fdb\u7a0b\u548c\u7ebf\u7a0b\u7684\u533a\u522b<br \/>\nhttp:\/\/blog.csdn.net\/zhongwen7710\/article\/details\/25008183<\/p>\n<p>\u300a\u6210\u795e\u4e4b\u8def-\u57fa\u7840\u7bc7\u300bJVM\u2014\u2014Java\u5185\u5b58\u76f8\u5173(\u5df2\u5b8c\u7ed3)<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"VJCTkiGX3a\"><p><a href=\"http:\/\/www.hollischuang.com\/archives\/1003\">\u300a\u6210\u795e\u4e4b\u8def-\u57fa\u7840\u7bc7\u300bJVM\u2014\u2014Java\u5185\u5b58\u6a21\u578b(\u5df2\u5b8c\u7ed3)<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a\u300a\u6210\u795e\u4e4b\u8def-\u57fa\u7840\u7bc7\u300bJVM\u2014\u2014Java\u5185\u5b58\u6a21\u578b(\u5df2\u5b8c\u7ed3)\u300b\u2014HollisChuang&#039;s Blog\" src=\"http:\/\/www.hollischuang.com\/archives\/1003\/embed#?secret=rDR6jAtndu#?secret=VJCTkiGX3a\" data-secret=\"VJCTkiGX3a\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\nJava\u865a\u62df\u673a\u7684\u5185\u5b58\u7ec4\u6210\u4ee5\u53ca\u5806\u5185\u5b58\u4ecb\u7ecd<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"jhnNxvhw0G\"><p><a href=\"http:\/\/www.hollischuang.com\/archives\/80\">Java\u865a\u62df\u673a\u7684\u5185\u5b58\u7ec4\u6210\u4ee5\u53ca\u5806\u5185\u5b58\u4ecb\u7ecd<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300aJava\u865a\u62df\u673a\u7684\u5185\u5b58\u7ec4\u6210\u4ee5\u53ca\u5806\u5185\u5b58\u4ecb\u7ecd\u300b\u2014HollisChuang&#039;s Blog\" src=\"http:\/\/www.hollischuang.com\/archives\/80\/embed#?secret=w09ZWtBfM4#?secret=jhnNxvhw0G\" data-secret=\"jhnNxvhw0G\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>Java GC\u5de5\u4f5c\u539f\u7406<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"caGafRxzuq\"><p><a href=\"http:\/\/www.hollischuang.com\/archives\/76\">Java GC\u5de5\u4f5c\u539f\u7406<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300aJava GC\u5de5\u4f5c\u539f\u7406\u300b\u2014HollisChuang&#039;s Blog\" src=\"http:\/\/www.hollischuang.com\/archives\/76\/embed#?secret=v6xweXx1fK#?secret=caGafRxzuq\" data-secret=\"caGafRxzuq\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><br \/>\n\u6392\u540dTop 16\u7684Java\u5b9e\u7528\u7c7b\u5e93<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"pZcAWyVS9Y\"><p><a href=\"http:\/\/www.hollischuang.com\/archives\/1606\">\u6392\u540dTop 16\u7684Java\u5b9e\u7528\u7c7b\u5e93<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a\u6392\u540dTop 16\u7684Java\u5b9e\u7528\u7c7b\u5e93\u300b\u2014HollisChuang&#039;s Blog\" src=\"http:\/\/www.hollischuang.com\/archives\/1606\/embed#?secret=kTz4S5M6qf#?secret=pZcAWyVS9Y\" data-secret=\"pZcAWyVS9Y\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>java \u6c4e\u578b\u00a0http:\/\/www.importnew.com\/19740.html<br \/>\nhttp:\/\/blog.csdn.net\/lonelyroamer\/article\/details\/7868820\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6cdb\u578b\u7684\u5185\u90e8\u539f\u7406\uff1a\u7c7b\u578b\u64e6\u9664\u4ee5\u53ca\u7c7b\u578b\u64e6\u9664\u5e26\u6765\u7684\u95ee\u9898<br \/>\nhttp:\/\/blog.csdn.net\/lonelyroamer\/article\/details\/7864531\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6cdb\u578b\u7684\u57fa\u672c\u4ecb\u7ecd\u548c\u4f7f\u7528<br \/>\nhttp:\/\/blog.csdn.net\/lonelyroamer\/article\/details\/7927212\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u901a\u914d\u7b26<\/p>\n<p>\uff2a\uff41\uff56\uff41\u306e\u53c2\u52a0\u8005\uff1a\uff30\uff27\u3001\uff23\uff4f\uff4d\uff50\uff49\uff4c\uff45\uff52\u3001\uff2a\uff36\uff2d<br \/>\ngeneric\u306e\u5b58\u5728\u4fa1\u5024\uff1a<br \/>\n\u56e0\u4e3a\u6709\u65e0\u9650\u7684\u53ef\u80fd\u6027\uff0c\u5c31\u53ea\u6709\u7a0b\u5e8f\u5458\u548c\u8fd0\u884c\u671f\u7684\u865a\u62df\u673a\u624d\u77e5\u9053\u8fd9\u4e2aObject\u5230\u5e95\u662f\u4e2a\u4ec0\u4e48\u7c7b\u578b\u7684\u5bf9\u8c61\u3002<br \/>\n\u5728\u7f16\u8bd1\u671f\u95f4\uff0c\u7f16\u8bd1\u5668\u65e0\u6cd5\u68c0\u67e5\u8fd9\u4e2aObject\u7684\u5f3a\u5236\u8f6c\u578b\u662f\u5426\u6210\u529f\uff0c\u5982\u679c\u4ec5\u4ec5\u4f9d\u8d56\u7a0b\u5e8f\u5458\u53bb\u4fdd\u969c\u8fd9\u9879\u64cd\u4f5c\u7684\u6b63\u786e\u6027\uff0c\u8bb8\u591aClassCastException\u7684\u98ce\u9669\u5c31\u4f1a\u88ab\u8f6c\u5ac1\u5230\u7a0b\u5e8f\u8fd0\u884c\u671f\u4e4b\u4e2d\u3002<br \/>\nJava\u8bed\u8a00\u4e2d\u7684\u6cdb\u578b\u5219\u4e0d\u4e00\u6837\uff0c\u5b83\u53ea\u5728\u7a0b\u5e8f\u6e90\u7801\u4e2d\u5b58\u5728\uff0c\u5728\u7f16\u8bd1\u540e\u7684\u5b57\u8282\u7801\u6587\u4ef6\u4e2d\uff0c\u5c31\u5df2\u7ecf\u88ab\u66ff\u6362\u4e3a\u539f\u6765\u7684\u539f\u59cb\u7c7b\u578b\uff08Raw Type\uff0c\u4e5f\u79f0\u4e3a\u88f8\u7c7b\u578b\uff09\u4e86\uff0c<br \/>\n\u5e76\u4e14\u5728\u76f8\u5e94\u7684\u5730\u65b9\u63d2\u5165\u4e86\u5f3a\u5236\u8f6c\u578b\u4ee3\u7801\uff0c\u56e0\u6b64\u5bf9\u4e8e\u8fd0\u884c\u671f\u7684Java\u8bed\u8a00\u6765\u8bf4\uff0cArrayList&lt;int&gt;\u4e0eArrayList&lt;String&gt;\u5c31\u662f\u540c\u4e00\u4e2a\u7c7b\u3002<br \/>\n\u6240\u4ee5\u8bf4\u6cdb\u578b\u6280\u672f\u5b9e\u9645\u4e0a\u662fJava\u8bed\u8a00\u7684\u4e00\u9897\u8bed\u6cd5\u7cd6\uff0cJava\u8bed\u8a00\u4e2d\u7684\u6cdb\u578b\u5b9e\u73b0\u65b9\u6cd5\u79f0\u4e3a\u7c7b\u578b\u64e6\u9664\uff0c\u57fa\u4e8e\u8fd9\u79cd\u65b9\u6cd5\u5b9e\u73b0\u7684\u6cdb\u578b\u88ab\u79f0\u4e3a\u4f2a\u6cdb\u578b<\/p>\n<p>\u7c7b\u578b\u9650\u5b9a\u5728\u6cdb\u578b\u7c7b\u3001\u6cdb\u578b\u63a5\u53e3\u548c\u6cdb\u578b\u65b9\u6cd5\u4e2d\u90fd\u53ef\u4ee5\u4f7f\u7528\uff0c\u4e0d\u8fc7\u8981\u6ce8\u610f\u4e0b\u9762\u51e0\u70b9\uff1a<\/p>\n<p>1\u3001\u4e0d\u7ba1\u8be5\u9650\u5b9a\u662f\u7c7b\u8fd8\u662f\u63a5\u53e3\uff0c\u7edf\u4e00\u90fd\u4f7f\u7528\u5173\u952e\u5b57 extends<\/p>\n<p>2\u3001\u53ef\u4ee5\u4f7f\u7528&amp;\u7b26\u53f7\u7ed9\u51fa\u591a\u4e2a\u9650\u5b9a\uff0c\u6bd4\u5982<\/p>\n<p>[java]<\/p>\n<p>1. public\u00a0static\u00a0&lt;T\u00a0extends\u00a0Comparable&amp;Serializable&gt;\u00a0T\u00a0get(T\u00a0t1,T\u00a0t2)<\/p>\n<p>public static &lt;T extends Comparable&amp;Serializable&gt; T get(T t1,T t2)<\/p>\n<p>3\u3001\u5982\u679c\u9650\u5b9a\u65e2\u6709\u63a5\u53e3\u4e5f\u6709\u7c7b\uff0c\u90a3\u4e48\u7c7b\u5fc5\u987b\u53ea\u6709\u4e00\u4e2a\uff0c\u5e76\u4e14\u653e\u5728\u9996\u4f4d\u7f6e<\/p>\n<p>[java]<\/p>\n<p>1. public\u00a0static\u00a0&lt;T\u00a0extends\u00a0Object&amp;Comparable&amp;Serializable&gt;\u00a0T\u00a0get(T\u00a0t1,T\u00a0t2)<\/p>\n<p>Java\u6cdb\u578b\u7684\u5b9e\u73b0\u65b9\u6cd5\uff1a\u7c7b\u578b\u64e6\u9664<br \/>\nJava\u4e2d\u7684\u6cdb\u578b\u57fa\u672c\u4e0a\u90fd\u662f\u5728\u7f16\u8bd1\u5668\u8fd9\u4e2a\u5c42\u6b21\u6765\u5b9e\u73b0\u7684\u3002\u5728\u751f\u6210\u7684Java\u5b57\u8282\u7801\u4e2d\u662f\u4e0d\u5305\u542b\u6cdb\u578b\u4e2d\u7684\u7c7b\u578b\u4fe1\u606f\u7684\u3002\u4f7f\u7528\u6cdb\u578b\u7684\u65f6\u5019\u52a0\u4e0a\u7684\u7c7b\u578b\u53c2\u6570\uff0c\u4f1a\u5728\u7f16\u8bd1\u5668\u5728\u7f16\u8bd1\u7684\u65f6\u5019\u53bb\u6389\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u5c31\u79f0\u4e3a\u7c7b\u578b\u64e6\u9664\u3002<\/p>\n<p>\u7bc4\u578b\uff1a\u304a\u3082\u306b\u300c\uff1d\u300d\u5de6\u306e\u5f15\u7528\u306e\u5236\u9650\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u901a\u914d\u7b26\u6709\u4e09\u79cd\uff1a<\/p>\n<p>1\u3001\u65e0\u9650\u5b9a\u901a\u914d\u7b26\u00a0\u00a0 \u5f62\u5f0f&lt;?&gt;<\/p>\n<p>2\u3001\u4e0a\u8fb9\u754c\u9650\u5b9a\u901a\u914d\u7b26 \u5f62\u5f0f&lt; ? extends Number&gt;\u00a0\u00a0\u00a0 \/\/\u7528Number\u4e3e\u4f8b<\/p>\n<p>3\u3001\u4e0b\u8fb9\u754c\u9650\u5b9a\u901a\u914d\u7b26\u00a0\u00a0\u00a0 \u5f62\u5f0f&lt; ? super Number&gt;\u00a0\u00a0\u00a0 \/\/\u7528Number\u4e3e\u4f8b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>java\u547d\u4ee4 http:\/\/blog.csdn.net\/huaweitman\/article\/details\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/posts\/1000"}],"collection":[{"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vongg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1000"}],"version-history":[{"count":4,"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/posts\/1000\/revisions"}],"predecessor-version":[{"id":1004,"href":"https:\/\/vongg.com\/index.php?rest_route=\/wp\/v2\/posts\/1000\/revisions\/1004"}],"wp:attachment":[{"href":"https:\/\/vongg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vongg.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vongg.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}