{"rsdb":{"rid":"155996","subhead":"","postdate":"0","aid":"117104","fid":"54","uid":"1","topic":"1","content":"

\u4e00\u3001Java\u5305\u7684\u6982\u5ff5\uff1a\u521b\u5efa\uff0c\u4f7f\u7528\u3002<\/p>

1.\u65b0\u5efa\u5305\uff1a<\/p>

\u6700\u4e0a\u9762\u4e00\u884c\uff0c\u4e4b\u524d\u4e0d\u80fd\u518d\u6709\u5176\u5b83\u4ee3\u7801\u4e86\u3002<\/p>

package \u5305\u540d;<\/p>

\u6ce8\u610f\uff1a\u5305\u540d\u4e00\u822c\u90fd\u6709\u547d\u540d\u7684\u89c4\u8303\u3002\u4f8b\u5982\uff1acom.itnba.maya.zy\uff08\u4ece\u5927\u5230\u5c0f\uff09\u3002<\/p>

\"\"<\/p>

<\/p>

2.\u4f7f\u7528\u5305\uff1a<\/p>

import \u5305\u540d.*;<\/p>

import \u5305\u540d.\u7c7b\u540d;<\/p>

\u4f8b\u5982\uff1aimport com.itnba.maya.zy.*;<\/p>

\u6ce8\u610f\uff1aimport\u4e0d\u8981\u653e\u5728package\u7684\u4e0a\u9762\u4e0a<\/p>

\u4e8c\u3001\u5e38\u91cf\u3002 final\u578b\u53d8\u91cf<\/p>

Java\u4e2d\u6ca1\u6709\u771f\u6b63\u7684\u5e38\u91cf\u3002\u53ea\u6709final\u578b\u7684\u53d8\u91cf\uff0c\u53ef\u4ee5\u5f53\u5e38\u91cf\u6765\u7528\u3002<\/p>

final\u578b\u53d8\u91cf\uff0c\u53ea\u6709\u4e24\u4e2a\u5730\u65b9\u53ef\u4ee5\u8d4b\u503c\uff0c\u5176\u4f59\u7684\u5730\u65b9\u662f\u4e0d\u80fd\u653e\u5728=\u5de6\u8fb9\u7684\u3002<\/p>

1.\u5728\u5b9a\u4e49\u7684\u65f6\u5019\u53ef\u4ee5\u8d4b\u503c\u3002<\/p>

2.\u5728\u6784\u9020\u51fd\u6570\u4e2d\u53ef\u4ee5\u8d4b\u503c\u3002\u5982\u679c\u5728\u5b9a\u4e49\u65f6\u8d4b\u503c\u4e86\uff0c\u5219\u5728\u6784\u9020\u51fd\u6570\u4e2d\u4e0d\u80fd\u8d4b\u503c\u3002\u5305\u62ec\u5b9a\u4e49\u65f6\u8d4b\u4e86null\u503c\uff0c\u5219\u5728\u6784\u9020\u51fd\u6570\u4e2d\u4e5f\u4e0d\u80fd\u518d\u8d4b\u503c\u3002<\/p>

\u4e09\u3001\u9759\u6001\u6210\u5458<\/p>

\u5173\u952e\u5b57\uff1astatic\uff0c\u4e0e\u201c\u9759\u6001\u201d\u76f8\u5bf9\u5e94\u7684\u53eb\u201c\u5b9e\u4f8b\u201d<\/p>

\u9759\u6001\u53d8\u91cf\u4e0e\u9759\u6001\u65b9\u6cd5\u3002 -- \u5b9e\u4f8b\u53d8\u91cf\u4e0e\u5b9e\u4f8b\u65b9\u6cd5\u3002<\/p>

\u5b9e\u4f8b\u53d8\u91cf\u4e0e\u5b9e\u4f8b\u65b9\u6cd5\u662f\u5c5e\u4e8e\u6bcf\u4e2a\u5355\u4e2a\u5bf9\u8c61\u7684\u3002\u9759\u6001\u53d8\u91cf\u4e0e\u9759\u6001\u65b9\u6cd5\u662f\u5c5e\u4e8e\u6240\u6709\u5bf9\u8c61\u5171\u4eab\u7684\uff0c\u5373\u5c5e\u4e8e\u7c7b\u7684\u3002<\/p>

\u9759\u6001\u53d8\u91cf\u5b58\u50a8\u6570\u636e\u7684\u65f6\u5019\u4e00\u5b9a\u8981\u6ce8\u610f\u9632\u6b62\u5171\u4eab\u51b2\u7a81\u3002<\/p>

\u9759\u6001\u65b9\u6cd5\u5185\u53ea\u80fd\u64cd\u4f5c\u5f53\u524d\u7c7b\u7684\u9759\u6001\u53d8\u91cf\u548c\u9759\u6001\u65b9\u6cd5\uff0c\u4e0d\u80fd\u64cd\u4f5c\u5b9e\u4f8b\u53d8\u91cf\u548c\u5b9e\u4f8b\u65b9\u6cd5\u3002\u5b9e\u4f8b\u65b9\u6cd5\u4e2d\u53ef\u4ee5\u8c03\u7528\u5f53\u524d\u7c7b\u7684\u9759\u6001\u53d8\u91cf\u548c\u9759\u6001\u65b9\u6cd5\u3002<\/p>

\u5355\u7c7b\u6a21\u5f0f\u3002\u5355\u4f8b\u6a21\u5f0f\u3002\u53ea\u80fd\u751f\u6210\u4e00\u4e2a\u5bf9\u8c61\u3002---\u6848\u4f8b\u3002private \u6784\u9020\u51fd\u6570\u3002\u9759\u6001\u65b9\u6cd5\u3002<\/p>

\u7b2c\u4e00\u6b65\uff1a\u628a\u6784\u9020\u51fd\u6570\u8bbe\u4e3aprivate\u3002
\u7b2c\u4e8c\u6b65\uff1a\u505a\u4e00\u4e2a\u5f53\u524d\u7c7b\u578b\u7684\u9759\u6001\u7684\u6210\u5458\u53d8\u91cf\u3002
\u7b2c\u4e09\u6b65\uff1a\u505a\u4e00\u4e2apublic\u7684\u9759\u6001\u6210\u5458\u65b9\u6cd5\u3002\u7528\u6765\u7ed9\u7b2c\u4e8c\u6b65\u4e2d\u7684\u6210\u5458\u53d8\u91cf\u5b9e\u4f8b\u5316\uff0c\u5e76\u8fd4\u56de\u56de\u53bb\u3002<\/p>

\u56db\u3001\u7ee7\u627f
\u5173\u952e\u8bcd\uff1aextends<\/p>

\u53ef\u4ee5\u628a\u7236\u7c7b\u4e2d\u7684\u76f8\u5173\u5185\u5bb9\u76f4\u63a5\u7ee7\u627f\u5230\u5b50\u7c7b\uff0c\u5b50\u7c7b\u5c31\u4e0d\u9700\u8981\u518d\u91cd\u65b0\u5b9a\u4e49\u3002<\/p>

private\uff0c\u7684\u6210\u5458\u65e0\u6cd5\u88ab\u7ee7\u627f<\/p>

public\uff0cprotected\u6c38\u8fdc\u88ab\u7ee7\u627f\u3002<\/p>

\u9ed8\u8ba4\uff0c\u53ea\u6709\u5728\u5f53\u524d\u5305\u4e2d\u53ef\u4ee5\u88ab\u7ee7\u627f\u3002<\/p>

\u5b50\u7c7b\u7684\u6210\u5458\u53d8\u91cf\u4e0e\u6210\u5458\u65b9\u6cd5\u6709\u4e24\u79cd\u64cd\u4f5c\uff1a\u4e00\u79cd\u662f\u6269\u5c55\uff0c\u53e6\u4e00\u79cd\u662f\u91cd\u5199\u3002<\/p>

\"\"<\/p>","orderid":"0","title":"Java \u4e2d\u5305\u7684\u6982\u5ff5\uff0c\u5e38\u91cf\uff0c\u9759\u6001\u4e0e\u7ee7\u627f","smalltitle":"","mid":"0","fname":"linux\u7f16\u7a0b\u57fa\u7840","special_id":"0","bak_id":"0","info":"0","hits":"136","pages":"1","comments":"0","posttime":"2017-01-02 08:15:17","list":"1483316117","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Java<\/A> \u5305\u7684<\/A> \u6982\u5ff5<\/A> \u5e38\u91cf<\/A> \u9759\u6001<\/A> \u7ee7\u627f<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.31","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"Java \u4e2d\u5305\u7684\u6982\u5ff5\uff0c\u5e38\u91cf\uff0c\u9759\u6001\u4e0e\u7ee7\u627f","lastview":"1507605026","digg_num":"3625","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}