Java³ÉÔ±µÄĬÈÏ·ÃÎÊ¿ØÖÆ
Java³ÉÔ±µÄĬÈÏ·ÃÎÊ¿ØÖÆ
ÎÒ¶¥¶ÔÓÚÒ»¸öClassµÄ³ÉÔ±±äÁ¿»ò³ÉÔ±º¯Êý£¬Èç¹û²»ÓÃpublic, protected, privateÖеÄÈκÎÒ»¸öÐÞÊΣ¬ÄÇô¸Ã³ÉÔ±»ñµÃ“ĬÈÏ·ÃÎÊ¿ØÖÆ”¼¶±ð£¬¼´package access £¨°ü·ÃÎÊ£©¡£
ÊôÓÚpackage accessµÄ³ÉÔ±¿ÉÒÔ±»Í¬Ò»¸ö°üÖеÄÆäËûÀà·ÃÎÊ£¬µ«²»Äܱ»ÆäËû°üµÄÀà·ÃÎÊ¡£
°ü·ÃÎʵĿØÖÆÁ¦ÈõÓÚprivate£¬µ«Ç¿ÓÚprotected¡£ÒòΪһ·½Ã棬ֻҪÊÇ×ÓÀ࣬²»¹Ü×ÓÀàÓ븸ÀàÊÇ·ñλÓÚͬһ¸ö°üÖУ¬ÄÇô×ÓÀ඼¿ÉÒÔ·ÃÎʸ¸ÀàÖеÄprotected·½·¨¡£µ«ÊÇÒ»µ©Î»ÓÚÔÀàµÄ°üÍ⣬²»¹ÜÊÇ·ñÊÇÆä×ÓÀ࣬¶¼ÎÞ·¨·ÃÎÊÆäÊôÓÚpackage access¼¶±ðµÄ³ÉÔ±¡£¶øÁíÒ»·½Ã棬һ¸öÀà¿ÉÒÔ·ÃÎÊͬһ¸ö°üÖÐÁíÒ»¸öÀàµÄpackage access³ÉÔ±£¬Í¬Ê±Ò²ÄÜ·ÃÎÊÆäprotected³ÉÔ±¡£
(×¢£ºpackageÊÇJavaÖеĹؼü×Ö£¬ËäÈ»°ü·ÃÎÊÒ²ÊÇÒ»ÖÖ·ÃÎÊ¿ØÖƼ¶±ð£¬µ«¹Ø¼ü×Ö”package”Ö»ÄÜÓÃÀ´±íʾÀàÊôÓÚÄĸö°ü£¬¶ø²»ÄÜÏñ”private”,”public”ÄÇÑù·Åµ½³ÉÔ±±äÁ¿»òº¯ÊýÇ°Ã棬×÷Ϊ·ÃÎÊ¿ØÖÆÐÞÊηû¡£)
·ÃÎʼ¶±ð±£»¤µÄÇ¿¶È£ºpublic<protected<ĬÈÏ<private
Ïà¹ØÎĵµ£º
javaÈçºÎ»ñµÃ´æ´¢¹ý³ÌµÄ²ÎÊý(Àý×Ó)
Connection conn = JDBCUtils.getConnection();
DatabaseMetaData dbmd = conn.getMetaData();
ResultSet rs = dbmd.getProcedureColumns(null, " ......
Õ⼸ÌìÒ»Ö±ÔÚ×öͼƬ´¦Àí£¬ÆäÖÐÓöµ½ÁËһЩÎÊÌ⣬ÔÚÍøÉÏÒ²ÕÒµ½Á˽â¾ö°ì·¨£¨ËäÈ»²»ÊÇ×î¼ÑµÄ£©£¬ÔÚÕâÀﻹÊÇ×÷¸ö¼Ç¼°É¡£
1 ¶àÕÅjpgͼºÏ³Égif¶¯»
/**
* °Ñ¶àÕÅjpgͼƬºÏ³ÉÒ»ÕÅ
* @param pic String[] ¶à¸öjpgÎļþÃû °üº¬Â·¾¶
* @param newPic String Éú³ÉµÄgifÎļþÃû °üº¬Â·¾¶
*/
private synchronized void jpgToGif(St ......
1.1 ²»ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀý
¡¡¡¡ÓÃnew¹Ø¼ü´Ê´´½¨ÀàµÄʵÀýʱ£¬¹¹Ô캯ÊýÁ´ÖеÄËùÓй¹Ô캯Êý¶¼»á±»×Ô¶¯µ÷Óᣵ«Èç¹ûÒ»¸ö¶ÔÏóʵÏÖÁËCloneable½Ó¿Ú£¬ÎÒÃÇ¿ÉÒÔµ÷ÓÃËüµÄclone()·½·¨¡£clone()·½·¨²»»áµ÷ÓÃÈκÎÀ๹Ô캯Êý¡£
¡¡¡¡ÔÚʹÓÃÉè¼Æģʽ£¨Design Pattern£©µÄ³¡ºÏ£¬Èç¹ûÓÃFactoryģʽ´´½¨¶ÔÏó£¬Ôò¸ÄÓÃclone()·½·¨´´½¨Ðµ ......
1£®Servlet³ÌÐòµÄÈë¿ÚµãÊÇ£º£¨ £©
A init£¨£©
B main£¨£©
C service£¨£©
D doGet£¨£©
²Î¿¼´ð°¸£ºA
2. SeverletÖУ¬HttpSeverletResponseµÄʲô·½·¨ÓÃÀ´°ÑÒ»¸öHTTPÇëÇóÖض¨Ïòµ½ÁíÍâµÄURL£¿£¨ £©
A sendURL()
B redirectURL()
C sendRedirect()
D ......
Ò»¡¢Spring»ù´¡ÖªÊ¶¼°IOC_Ñ¡ÔñÌâ
1. ÏÂÃæ¹ØÓÚspringÃèÊö´íÎóµÄÊÇ£º£¨ £©
A SpringÖ§³Ö¿É²åÈëµÄÊÂÎñ¹ÜÀíÆ÷£¬Ê¹ÊÂÎñ»®·Ö¸üÇáËÉ£¬Í¬Ê±ÎÞÐè´¦Àíµ×²ãµÄÎÊÌâ¡£
B SpringÊÂÎñ¹ÜÀíµÄͨÓóéÏó²ã»¹°üÀ¨JTA²ßÂÔºÍÒ»¸öJDBC DataSource¡£
C ÓëJTA»òEJB CMTÒ»Ñù£¬SpringµÄÊÂÎñÖ§³ÖÒÀÀµÓÚJava EE»·¾³¡£
D Spr ......