makefile Ö® java X Ö® lint
E:\>javac -X
-Xlint ÆôÓý¨ÒéµÄ¾¯¸æ
-Xlint:{all,deprecation,unchecked,fallthrough,path,serial,finally,-deprecat ion
,-unchecked,-fallthrough,-path,-serial,-finally}ÆôÓûò½ûÓÃÌض¨µÄ¾¯¸æ
-Xbootclasspath/p:<·¾¶> ÖÃÓÚÒýµ¼Àà·¾¶Ö®Ç°
-Xbootclasspath/a:<·¾¶> ÖÃÓÚÒýµ¼Àà·¾¶Ö®ºó
-Xbootclasspath:<·¾¶> ¸²¸ÇÒýµ¼ÀàÎļþµÄλÖÃ
-Djava.ext.dirs=<Ŀ¼> ¸²¸Ç°²×°µÄÀ©Õ¹Ä¿Â¼µÄλÖÃ
-Djava.endorsed.dirs=<Ŀ¼> ¸²¸ÇÇ©ÃûµÄ±ê׼·¾¶µÄλÖÃ
-Xmaxerrs <±àºÅ> ÉèÖÃÒªÊä³öµÄ´íÎóµÄ×î´óÊýÄ¿
-Xmaxwarns <±àºÅ> ÉèÖÃÒªÊä³öµÄ¾¯¸æµÄ×î´óÊýÄ¿
-Xstdout <ÎļþÃû> Öض¨Ïò±ê×¼Êä³ö
ÕâЩѡÏÊǷDZê׼ѡÏעÒâ¸üС£¡£¡£
ÎÒÃÇÒÀ´ÎÀ´¿´¿´ÆäÖÐÉæ¼° lint µÄÑ¡Ï
-Xlint
ÆôÓÃËùÓо¯¸æ¡£¸ÃÑ¡ÏîÏ൱ÓÚ -Xlint:all Ñ¡Ïî¡£Ïà·´£¬¹Ø±ÕËùÓо¯¸æµÄÑ¡ÏîΪ -Xlint:none¡£
-Xlint:unchecked
ÆôÓöÔËùνµÄδ¾¼ì²éµÄת»»£¨unchecked warning£©µÄ¾¯¸æ¡£Õâ¸ö¾¯¸æÉæ¼° JDK 5.0 ÖеÄÐÂÌØÐÔ——·¶ÐÍ£¨Generic
Type£©£¬Õâ¾ø¶ÔÊÇÁíÍâÒ»¸ö¹ÊÊÂÁË¡£ÓÐÐËȤµÄ»°£¬¿ÉÒÔÔÚ Internet ÉÏËÑË÷µ½ºÜ¶à¹ØÓÚ·¶Ð͵ÄÎÄÕ¡£
-Xlint:path
µ±·¢ÏÖ²»´æÔڵķ¾¶»òÕßĿ¼ʱ¸ø³ö¾¯¸æ£¬±ÈÈç±ê׼ѡÏîÖеÄÀà·¾¶£¨classpath£©£¬Ô´´úÂë·¾¶£¨sourcepath£©µÈµÈ¡£
-Xlint:serial
µ±ÔÚ¿ÉÐòÁл¯µÄÀàÖÐûÓз¢ÏÖ serialVersionUID µÄ¶¨Òåʱ£¬¸ø³ö¾¯¸æ¡£
Xlint:finally
µ±·¢ÏÖ finally ×Ó¾äÎÞ·¨Õý³£½áÊøµÄÇé¿öʱ¸ø³ö¾¯¸æ¡£±ÈÈçÏÂÃæÕâ¶Î´úÂ룺
try {
} catch (Exception e) {
} finally {
for (;;);
}
-Xlint:fallthrough
µ±ÔÚ switch Óï¾ä¿éÖз¢ÏÖ fall-through µÄÇéÐÎʱ¸ø³ö¾¯¸æ¡£ÕâÀïËù˵µÄ fall-through ÇéÐÎÖ¸µÄÊÇÔÚ
switchÓï¾ä
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
/**
* ±£ÁôÁ½Î»Ð¡Êý
* @param d
* @return
*/
private static double remainTwoNumbers(double d){
java.math.BigDecimal f1 = new java.math.BigDecimal(d);//СÊýµãºó±£Áô2Î ......
Ò»¡¢´Ó¸ù±¾ÉÏÈÏʶjava.lang.StringÀàºÍString³Ø
Ê×ÏÈ£¬ÎÒ½¨ÒéÏÈ¿´¿´StringÀàµÄÔ´ÂëʵÏÖ£¬ÕâÊÇ´Ó±¾ÖÊÉÏÈÏʶStringÀàµÄ¸ù±¾³ö·¢µã¡£´ÓÖпÉÒÔ¿´µ½£º
1¡¢StringÀàÊÇfinalµÄ£¬²»¿É±»¼Ì³Ð¡£public final class String¡£
2¡¢StringÀàÊǵı¾ÖÊÊÇ×Ö·ûÊý×échar[], ²¢ÇÒÆäÖµ²»¿É¸Ä±ä¡£private final char value[];
È»ºó´ò¿ªStr ......
1.JAVAÁ¬½ÓACCESSÊý¾Ý¿â
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ="+application.getRealPath("/Data/ReportDemo.mdb");
Connection conn = DriverManager.getConnection(url,"","");
ÔÚÉÏÃæµÄÁ¬½Ó·½·¨ÖУ¬ËùÉæ¼°µ½µÄ²ÎÊýº¬ÒåÈçÏÂËùʾ ......