´«ÖDz¥¿Íjavaѧϰ2
½ñÌìºÜ¸ßÐË¿´ÁËÕÅТÏéÀÏʦ½²µÄJava»ù´¡ÊÓƵ¡£
ÕÅÀÏʦÊ×ÏȽ²µÄÊÇfinal¡¢super¡¢this staticµÄÓ÷¨£¬ÕÅÀÏʦÊÇÕâÑù½²µÄ£¬ÎÒ×öÁËһЩ¼òµ¥µÄ¼Ç¼£º
1. finalÀàÊDz»ÄÜÔÙ±»¼Ì³ÐµÄÀ࣬¼´Ëü²»ÄÜÔÙÓÐ×ÓÀ࣬
2. final·½·¨²»Äܱ»×ÓÀàµÄ·½·¨¸²¸Ç£¬ÓÃÀ´·ÀÖ¹×ÓÀà¸Ä±äËüµÄ±¾À´º¬Ò壬
3. ·½·¨Öж¨ÒåµÄÄÚÖÃÀàÖ»ÄÜ·ÃÎʸ÷½·¨ÄÚµÄfinalÀàÐ͵ľֲ¿±äÁ¿£¬ÓÃfinal¶¨ÒåµÄ¾Ö²¿±äÁ¿Ï൱ÓÚÊÇÒ»¸ö³£Á¿£¬ËüµÄÉúÃüÖÜÆÚ³¬³ö·½·¨ÔËÐеÄÉúÃüÖÜÆÚ£¬½«Ò»¸öÐβζ¨Òå³ÉfinalÒ²ÊÇ¿ÉÒԵģ¬Õâ¾ÍÏÞ¶¨ÁËÎÒÃÇÔÚ·½·¨ÖÐÐÞ¸ÄÐÎʽ²ÎÊýµÄÖµ¡£
4. static¾²Ì¬·½·¨£ºÔÚ¾²Ì¬·½·¨ÀïÖ»ÄÜÖ±½Óµ÷ÓÃͬÀàÖÐÆäËüµÄ¾²Ì¬³ÉÔ±£¨°üÀ¨±äÁ¿ºÍ·½·¨£©£¬¶ø²»ÄÜÖ±½Ó·ÃÎÊÀàÖеķǾ²Ì¬³ÉÔ±¡£ÕâÊÇÒòΪ£¬¶ÔÓڷǾ²Ì¬µÄ·½·¨ºÍ±äÁ¿£¬ÐèÒªÏÈ´´½¨ÀàµÄʵÀý¶ÔÏóºó²Å¿ÉʹÓ㬶ø¾²Ì¬·½·¨ÔÚʹÓÃÇ°²»Óô´½¨ÈκζÔÏó¡£
5. ¾²Ì¬·½·¨²»ÄÜÒÔÈκη½Ê½ÒýÓÃthisºÍsuper¹Ø¼ü×Ö£¨super¹Ø¼ü×ÖÔÚÏÂÒ»Õ½²½â£©¡£ÓëÉÏÃæµÄµÀÀíÒ»Ñù£¬ÒòΪ¾²Ì¬·½·¨ÔÚʹÓÃÇ°²»Óô´½¨ÈκÎʵÀý¶ÔÏ󣬵±¾²Ì¬·½·¨±»µ÷ÓÃʱ£¬thisËùÒýÓõĶÔÏó¸ù±¾¾ÍûÓвúÉú¡£
6. main() ·½·¨ÊǾ²Ì¬µÄ£¬Òò´ËJVMÔÚÖ´ÐÐmain·½·¨Ê±²»´´½¨main·½·¨ËùÔÚµÄÀàµÄʵÀý¶ÔÏó£¬Òò¶øÔÚmain()·½·¨ÖУ¬ÎÒÃDz»ÄÜÖ±½Ó·ÃÎʸÃÀàÖеķǾ²Ì¬³ÉÔ±£¬±ØÐë´´½¨¸ÃÀàµÄÒ»¸öʵÀý¶ÔÏóºó£¬²ÅÄÜͨ¹ýÕâ¸ö¶ÔÏóÈ¥·ÃÎÊÀàÖеķǾ²Ì¬³ÉÔ±£¬
superµÄÓÃ;£ºµ±×ÓÀàÒþ²ØÁ˳¬ÀàµÄ³ÉÔ±±äÁ¿»ò¸²¸ÇÁ˳¬ÀàµÄ·½·¨ºó£¬ÀûÓÃsuper£¬×ÓÀà·½·¨¿ÉÒÔÒýÓó¬ÀàµÄ³ÉÔ±±äÁ¿ºÍ±»¸²¸ÇµÄ·½·¨£¨»¹¿ÉÒÔµ÷Óó¬ÀàµÄ¹¹Ôì·½·¨£¬·½·¨ÒÔ¼°³ÉÔ±±äÁ¿£©
thisµÄÓÃ;£º
1. ½«¶ÔÏó×Ô¼º×÷Ϊ²ÎÊý£¬µ÷ÓñðµÄ·½·¨£¬
2.
Ïà¹ØÎĵµ£º
javaÖеľ²Ì¬´úÀíÓ붯̬´úÀí
±¾À´´òËã½ñÌìдµãjpa·½ÃæµÄ¶«Î÷£¬½á¹û¸ãÉÏÁË´úÀí£¬Ë÷ÐԾͰÑÑо¿³É¹û·Å³öÀ´°É£¬javaÖеĴúÀíÓÐÁ½ÖÖÒ»ÖÖÊǾ²Ì¬´úÀíÒ»ÖÖÊǶ¯Ì¬´úÀí£¬¾²Ì¬´úÀíÆäʵºÜÈÝÒ×Àí½â£¬¾²Ì¬´úÀíÆäʵ¾ÍÊǸö×°ÊÎÆ÷¶øÒÑ£¬¶ø¶¯Ì¬´úÀíÔò½èÖúÓÚjvmµÄÖ§³Ö£¬ÔÚÔËÐÐʱ¶¯Ì¬Éú³É´úÀíÀà¡£
ÔÚÕ ......
1¡¢Oracle8/8i/9iÊý¾Ý¿â£¨thinģʽ£©
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl";
//orclΪÊý¾Ý¿âµÄSID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,user,password);
2¡¢DB2 ......
д¸öMANIFEST.MF
Manifest-Version: 1.0
Created-By: shijishang
Main-Class: test2
×¢ÒâðºÅÖ®ºóÓпոñ£¬×îºóÒª¿ÕÁ½ÐÐ
ÓÃÃüÁîjar cvfm classes.jar META-INF/MANIFEST.MF classes
д¸öCMDÃüÁî
@echo off
java -jar -verbose:class classes.jar >> class.txt
pause
µ¼³öÐèÒª¾«¼òµÄ»ù±¾Àà
ÔÙÓÃÒÔÉÏ´ò ......
Õâ¸ö¹ØÓÚJMS(Java Message Service)µÄ¸ÅÒª»Ø´ðÁËÏÂÃ漸¸öÎÊÌ⣺
1.ʲôÊÇÏûÏ¢£¿
2.ôÊÇJMS API£¿
3.ÈçºÎʹÓÃJMS API£¿
4. JMS APIÊÇÈçºÎÓëJ2EEƽ̨һÆð¹¤×÷µÄ£¿
1.1ʲôÊÇÏûÏ¢£¿
ÏûÏ¢ÊÇÈí¼þ×é¼þ»òÕßÓ¦ÓÃÖ®¼ä½»Á÷µÄÒ»ÖÖ·½·¨¡£ÏûϢϵͳÊÇÒ»¸öµã¶ÔµãµÄ¹¦ÄÜ£¬Ò»¸öÏûÏ¢¿Í»§¶Ë¿ÉÒÔ·¢ËÍºÍ½Ó ......