Javaѧϰ±Ê¼Ç¢Ü javaÐÞÊδÊ×ܽá
JavaÓïÑÔ¶¨ÒåÁËpublic¡¢protected¡¢private¡¢abstract¡¢staticºÍfinalÕâ6ÖÖ³£ÓÃÐÞÊδÊÍ⻹¶¨ÒåÁË5¸ö²»Ì«³£ÓõÄÐÞÊδʣ¬ÏÂÃæÊǶÔÕâ11¸öJavaÐÞÊδʵĽéÉÜ£º
1.public
ʹÓöÔÏó£ºÀà¡¢½Ó¿Ú¡¢³ÉÔ±
½éÉÜ£ºÎÞÂÛËüËù´¦Ôڵİü¶¨ÒåÔÚÄÄ£¬¸ÃÀࣨ½Ó¿Ú¡¢³ÉÔ±£©¶¼ÊÇ¿É·ÃÎʵÄ
2.private
ʹÓöÔÏ󣺳ÉÔ±
½éÉÜ£º³ÉÔ±Ö»¿ÉÒÔÔÚ¶¨ÒåËüµÄÀàÖб»·ÃÎÊ
3.static
ʹÓöÔÏó£ºÀà¡¢·½·¨¡¢×ֶΡ¢³õʼ»¯º¯Êý
½éÉÜ£º³ÉÃûΪstaticµÄÄÚ²¿ÀàÊÇÒ»¸ö¶¥¼¶À࣬ËüºÍ°üº¬ÀàµÄ³ÉÔ±ÊDz»Ïà¹ØµÄ¡£¾²Ì¬·½·¨
ÊÇÀà·½·¨£¬
ÊDZ»Ö¸Ïòµ½ËùÊôµÄÀà¶ø²»ÊÇÀàµÄʵÀý¡£¾²Ì¬×Ö¶ÎÊÇÀà×ֶΣ¬ÎÞÂÛ¸Ã×Ö¶ÎËùÔÚµÄÀà´´½¨ÁË
¶àÉÙʵÀý£¬¸Ã×Ö¶ÎÖ»´æÔÚÒ»¸öʵÀý±»Ö¸Ïòµ½ËùÊôµÄÀà¶ø²»ÊÇÀàµÄʵÀý¡£³õʼ»¯º¯ÊýÊÇÔÚ×°ÔØÀàʱִÐÐ
µÄ£¬¶ø²»ÊÇÔÚ´´½¨
ʵÀýʱִÐеġ£
4.final
ʹÓöÔÏó£ºÀà¡¢·½·¨¡¢×ֶΡ¢±äÁ¿
½éÉÜ£º±»¶¨Òå³ÉfinalµÄÀ಻ÔÊÐí³öÏÖ×ÓÀ࣬²»Äܱ»¸²¸Ç£¨²»Ó¦ÓÃÓÚ¶¯Ì¬²éѯ£©£¬×Ö¶ÎÖµ
²»ÔÊÐí±»
Ð޸ġ£
5.abstract
ʹÓöÔÏó£ºÀà¡¢½Ó¿Ú¡¢·½·¨
½éÉÜ£ºÀàÖаüÀ¨Ã»ÓÐʵÏֵķ½·¨£¬²»Äܱ»ÊµÀý»¯¡£Èç¹ûÊÇÒ»¸öabstract·½·¨£¬Ôò·½·¨Ìå
Ϊ¿Õ£¬¸Ã·½
·¨µÄʵÏÖÔÚ×ÓÀàÖỶ¨Ò壬²¢ÇÒ°üº¬Ò»¸öabstract·½·¨µÄÀà±ØÐëÊÇÒ»¸öabstractÀà
6.protected
ʹÓöÔÏ󣺳ÉÔ±
½éÉÜ£º³ÉÔ±Ö»ÄÜÔÚ¶¨ÒåËüµÄ°üÖб»·ÃÎÊ£¬Èç¹ûÔÚÆäËû°üÖб»·ÃÎÊ£¬ÔòʵÏÖÕâ¸ö·½·¨µÄÀà
±ØÐëÊǸóÉÔ±ËùÊôÀàµÄ×ÓÀà¡£
7.native
ʹÓöÔÏ󣺳ÉÔ±
½éÉÜ£ºÓë²Ù×÷ƽ̨Ïà¹Ø£¬¶¨Òåʱ²¢²»¶¨ÒåÆä·½·¨£¬·½·¨µÄʵÏÖ±»Ò»¸öÍⲿµÄ¿âʵÏÖ¡£
8.strictfp
ʹÓöÔÏó£ºÀà¡¢·½·¨
½éÉÜ£ºstrictfpÐÞÊεÄÀàÖÐËùÓеķ½·¨¶¼Òþ²ØÁËstrictfpÐÞÊδʣ¬·½·¨Ö´ÐеÄËùÓи¡µã
¼ÆËã×ñÊØIEEE 754±ê×¼£¬ËùÓÐÈ¡Öµ°üÀ¨ÖмäµÄ½á¹û¶¼±ØÐë±íʾΪfloat»òdoubleÀàÐÍ£¬¶ø²»ÄÜÀûÓÃ
Óɱ¾µØƽ̨¸¡µã¸ñʽ»òÓ²¼þÌṩµÄ¶îÍ⾫¶È»ò±íʾ·¶Î§¡£
9.synchronized
ʹÓöÔÏ󣺷½·¨
½éÉÜ£º¶ÔÓÚÒ»¸ö¾²Ì¬µÄ·½·¨£¬ÔÚÖ´ÐÐ֮ǰjvm°ÑËüËùÔÚµÄÀàËø¶¨£»¶ÔÓÚÒ»¸ö·Ç¾²Ì¬ÀàµÄ·½
·¨£¬Ö´ÐÐÇ°°Ñij¸öÌض¨¶ÔÏóʵÀýËø¶¨¡£
10.volatile
ʹÓöÔÏó£º×Ö¶Î
½éÉÜ£ºÒòΪÒì²½Ï߳̿ÉÒÔ·ÃÎÊ×ֶΣ¬ËùÒÔÓÐЩÓÅ»¯²Ù×÷ÊÇÒ»¶¨²»ÄÜ×÷ÓÃÔÚ×Ö¶ÎÉϵġ£
volatileÓÐʱ¿ÉÒÔ´úÌæsynchronized¡£
11.transient
ʹÓöÔÏó£º×Ö¶Î
½éÉÜ£º×ֶβ»ÊǶÔÏó³Ö¾Ã״̬µÄÒ»²¿·Ö£¬²»Ó¦¸Ã°Ñ×ֶκͶÔÏóÒ»Æð´®Æð¡£
×î¹Ø¼ü²¿·ÖÈçÏ£º
·ÃÎÊȨÏÞÉæ¼°ÁËpublic private protected ºÍĬÈϵİü·ÃÎÊ
public
Ïà¹ØÎĵµ£º
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ
......
Tiger ÖеÄÒ»¸öÖØÒªÐÂÌØÐÔÊÇö¾Ù¹¹Ô죬ËüÊÇÒ»ÖÖеÄÀàÐÍ£¬ÔÊÐíÓó£Á¿À´±íʾÌض¨µÄÊý¾Ý Ƭ¶Ï£¬¶øÇÒÈ«²¿¶¼ÒÔÀàÐÍ°²È«µÄÐÎʽÀ´±íʾ¡£Tiger ר¼Ò¡¢developerWorks µÄ¶à²ú×÷Õß Brett McLaughlin½«½âÊÍö¾ÙµÄ¶¨Ò壬½éÉÜÈçºÎÔÚÓ¦ÓóÌÐòÖÐÔËÓÃö¾Ù£¬ÒÔ¼°ËüΪʲôÄܹ»ÈÃÄúÅ×ÆúËùÓоɵÄ
public static final ´úÂë¡£
& ......
ת×Ô £º http://hi.baidu.com/samuel_vong/blog/item/95471f7e2cdab33d0cd7dad1.html
/**
* ²úÉúËæ»ú×Ö·û´®
* */
private static Random randGen = null;
private static char[] numbersAndLetters = null;
private static Object initLock = new Object();
public static final Strin ......
ÔÚJDKÖУ¬ÓÐÒ»¸ö·Ç³£ÓÐÒâ˼µÄ¿â£ºNIO£¨New I/O£©¡£Õâ¸ö¿âÖÐÓÐ3¸öÖØÒªµÄÀ࣬·Ö±ðÊÇjava.nio.channelsÖÐSelectorºÍChannel£¬ÒÔ¼°java.nioÖеÄBuffer¡£
±¾ÆªÎÄÕÂÎÒÃÇÊ×ÏÈÁ˽âÒ»ÏÂΪʲôÐèÒªNIOÀ´½øÐÐÍøÂç±à³Ì£¬È»ºó¿´¿´Ò»²½Ò»²½À´½²½âÈçºÎÔÚÍøÂç±à³ÌÖÐʹÓÃNIO¡£
ΪʲôÐèÒªNIO
ʹÓÃJava±àд¹ýSocket³ÌÐòµÄͬѧһ¶¨¶¼ÖªµÀSoc ......
ÓÐЩʱºò,ÎÒÃÇÏëÔÚµ±Ç°µÄÈÕÆÚÉϼӼ¸Ìì¡¢¼¸¸öÔ£¬»ò¼¸Ä꣬ʹÓÃjava.util.Date£¬È´×ÜÒ²ÕÒ²»µ½ºÏÊʵķ½·¨£¬ÎÞÄÎ֮ϣ¬ÇëÒ»¸ö¸ßÈË°ï棬ÀÏÁõ¸øÁËÒ»¾ä»°£ºÊ¹ÓÃCanlender¡£Ö®ºó£¬ÎÒ¾ÍʹÓÃCalender£¬Ò»Ó㬻¹ÕæºÃÓ㬾Íд³öÀ´£¬ºÍ´ó¼Ò¹²Í¬·ÖÏí£º
² ÎÒµÄÐèÇó
ÎÒÔÚ×÷Ò»¸öµ÷²éÎÊ¾í£¬ÏëÉ趨ÎʾíµÄÓÐЧÌìÊý£ºÔÚ·¢²¼Ö ......