Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÊý×Ö×Ô¶¯²¹Áã


public class P {
public static void main(String[] args){
String pattern="000";
java.text.DecimalFormat df = new java.text.DecimalFormat(pattern);
int i = 10,j=6;
System.out.println("i="+df.format(i)+"\nj="+df.format(j));
}
}
---------------------Êä³ö-----------------------
i=010
j=006


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

JAVAÎļþ²Ù×÷FileÀàºÍFilenameFilterµÄʹÓÃ

FileÀà
´´½¨Ä¿Â¼£¬ÓÃmkdirºÍmkdirsµÄº¯Êý
public boolean mkdir():´´½¨´Ë³éÏ󷾶ÃûÖ¸¶¨µÄĿ¼¡£
public boolean mkdirs():´´½¨´Ë³éÏ󷾶ÃûÖ¸¶¨µÄĿ¼£¬°üÀ¨ËùÓбØÐ赫²»´æÔڵĸ¸Ä¿Â¼¡£×¢Ò⣬´Ë²Ù×÷ʧ°ÜʱҲ¿ÉÄÜÒѾ­³É¹¦µØ´´½¨ÁËÒ»²¿·Ö±ØÐèµÄ¸¸Ä¿Â¼¡£
mkdirÀý×Ó£º
 File dir = new File("E:/mydir/");
if(!di ......

Java»ñÈ¡ÇëÇó¿Í»§¶ËµÄÕæʵIPµØÖ·

 ÔÚJSPÀ»ñÈ¡¿Í»§¶ËµÄIPµØÖ·µÄ·½·¨ÊÇ£ºrequest.getRemoteAddr()£¬ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁËApache,SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæʵIPµØÖ·ÁË¡£
Èç¹ûʹÓÃÁË·´Ïò´úÀíÈí¼þ£¬½«http://192.168.1.110:2046/ µÄURL·´Ïò´úÀíΪhttp://www.xxx.com/ µÄURLʱ£¬ÓÃrequest.getRemoteAddr()·½ ......

javaÖйØÓÚÓÅÏȼ¶¶ÓÁеÄʵÏÖ




       
Õ⼸ÌìÒ»Ö±ÔÚ¸ã¹ØÓÚÓÅÏȼ¶¶ÓÁеÄʵÏÖ,ÒòΪҪ¿¼Âǵ½Ï̵߳ݲȫ,ËùÒÔPriorityQueue¾Í²»ÊÊÓÃÁË¡£Ò»¸ö·Ç³£¼òµ¥µÄʵÏÖ·½
·¨£¬ÄǾÍÊÇ°ÑÓÅÏȼ¶±È½ÏºÃµÄ²åÈëÒ»¸ö¶ÓÁУ¬ÓÅÏȼ¶µÍµÄ²åÈëÁíÒ»¸ö¶ÓÁУ¬È¡ÊýµÄʱºòÏÈÔÚÓÅÏȼ¶¸ßµÄ¶ÓÁÐÉÏÈ¡Êý¡£ÕâÓиöȱµã¾ÍÊÇÈç¹ûÓÅÏȼ¶±ðÔ½¶àµÄ»°£¬¶ÓÁ ......

JavaÖеÄvolatile¹Ø¼ü×Ö

 ÎÒÃÇÖªµÀ£¬ÔÚJavaÖÐÉèÖñäÁ¿ÖµµÄ²Ù×÷£¬³ýÁËlongºÍ doubleÀàÐ͵ıäÁ¿ÍⶼÊÇÔ­×Ó²Ù×÷£¬Ò²¾ÍÊÇ˵£¬¶ÔÓÚ±äÁ¿ÖµµÄ¼òµ¥¶Áд²Ù×÷ûÓбØÒª½øÐÐͬ²½¡£ÕâÔÚJVM 1.2֮ǰ£¬JavaµÄÄÚ´æÄ£ÐÍʵÏÖ×ÜÊÇ´ÓÖ÷´æ¶ÁÈ¡±äÁ¿£¬ÊDz»ÐèÒª½øÐÐÌرðµÄ×¢ÒâµÄ¡£¶øËæ×ÅJVMµÄ³ÉÊìºÍÓÅ»¯£¬ÏÖÔÚÔÚ¶àÏ̻߳·¾³ÏÂvolatile¹Ø¼ü×ÖµÄʹÓñäµÃ·Ç³£ÖØÒª¡£ÔÚµ±Ç°µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ