javaµÄstring format
×ܵĸñʽÊÇ£º
%[argument_index$][flags][width][.precision]conversion
ÀýÈ磺
%2$-5.2s
//2$£ºÈ¡µÚ¶þ¸ö²ÎÊý
//-: Ö¸¶¨Îª×ó¶ÔÆë£¬Ä¬ÈÏÓÒ¶ÔÆë
//5£º×î´óÊä³ö¿í¶ÈΪ20,²»¹»»á²¹¿Õ¸ñ£¬Êµ¼ÊÈô³¬¹ýÔòÈ«²¿Êä³ö
//.2£ºÔڴ˱íʾÊä³ö²ÎÊý2µÄ×î´ó×Ö·ûÊýÁ¿£¬Èç¹ûÊǸ¡µãÊý×Ö£¬Ôò±íʾСÊý²¿·ÖÏÔʾµÄλÊý
//s £º±íʾÊäÈë²ÎÊýÊÇ×Ö·û´®
refs£º
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html
Ïà¹ØÎĵµ£º
ÕÐÆ¸-java¸ß¼¶¿ª·¢¹¤³Ìʦ
Ŀǰ¹«Ë¾ÒµÎñ·¢Õ¹Ñ¸ËÙ£¬ÐèÒªÓÅÐã¼¼ÊõÈËÔ±µÄ¼ÓÈ룬ÎÒÃǵıê×¼·Ç³£¼òµ¥¡£
ÎÒÃDz»ÒªÇó£º
1¡¢²»ÒªÇóÄãÊÇÃûУ±ÏÒµ¡£
2¡¢²»ÒªÇóÄã¾ßÓÐÈýÄêÒÔÉÏjava¿ª·¢¾Ñ飬µ±È»±ØÒªµÄ¿ª·¢¾ÑéÊÇÒªÓе쬷ñÔòÏÂÃæµÄÒªÇóÄãÒ»¶¨´ï²»µ½¡£
3¡¢²»ÒªÇóÄãÁ˽âÆäËû¿ª·¢ÓïÑÔ£¬ÈçC/C++¡¢php¡¢ruby¡£
4¡¢²»ÒªÇóÄ㾫ͨÊý¾Ý¿â ......
1¡¢Êý¾Ý¿âÐÔÄÜÓÅ»¯ÓÐÄÇЩ´ëÊ©£¨ORACLE/SYBASE/DB2/SQLSERVERѡһÖÖ£©2¡¢Ð´Ò»¸ö³ÌÐò£¬°Ñ×Ö·û´®µ¹Ðð£¬ÒªÇó“ÄãºÃѽ”±äΪ“ѽºÃÄ㔣¨´¦ÀíÖÐÎÄ£©3¡¢Ãû´Î½âÊÍ£¨¼Ì³Ð¡¢ÖØÔØ¡¢½Ó¿Ú£©4¡¢JAVAÏß³ÌʵÏÖÓÐÄÇЩ·½·¨£¬ËµÃ÷Ö®5¡¢JAVAÄÚ´æÒÅ©ʲôÔÒò6¡¢´ÓÏîÄ¿¹ÜÀí½Ç¶È·ÖÎöÐèÇó±ä¶¯µÄ¿ØÖÆ7¡¢JAVA SERVLETµÄÉ ......
1.½Ó¿ÚµÄ·½·¨Ä¬È϶¼ÊÇpublic µÄ£¬·½·¨Ö»ÄÜÊÇpublic&abstract,·½·¨µÄʵÏÖ²»ÄÜСÓÚ½Ó¿Ú·½·¨µÄvisibality.
½Ó¿ÚÖеÄÓòĬÈÏÊÇpublic static finalµÄ¡£
Ò»¸öÀà¿ÉÒÔʵÏֺܶà¸ö½Ó¿Ú¡£
2.ÄÚ²¿Àà¾ßÓÐÍâΧÀࣨenclosing class£©µÄËùÓÐÔªËØµÄ·ÃÎÊȨ¡£
3.ÄäÃûÀàÈç¹ûÏ£ÍûÊÇÓÐÒ»¸öÔÚÆäÍⲿ¶¨ÒåµÄ¶ÔÏó£¬ ......
ÕâÊÇÒ»¸öûÓÐÑéÖ¤ÐÐÕþÇø´úÂëµÄ£¬ËùÒÔÕâ¸ö²»ËãÍêÈ«£¬µ«ÊÇÎÒÃÇÔÚ×öʵ¼ÊÓ¦ÓÃʱ¿ÉÒÔ¼ÓÉÏ£¬ÕâÀïÎÒû¼Ó¡£
Ô´ÂëÈçϽö¹©²Î¿¼.
package ibees.validator;
import java.util.regex.Pattern;
/**
* ³£ÓõÄÑéÖ¤,source charset utf-8
*
* @author hhzxj2008
* */
public class CommonValidator {
public static boolea ......
ÒÔǰÎÒÒ»Ö±ÒÔΪFile#renameTo(File)·½·¨ÓëOSÏÂÃæµÄ move/mv ÃüÁîÊÇÏàͬµÄ£¬¿ÉÒÔ´ïµ½¸ÄÃû¡¢Òƶ¯ÎļþµÄÄ¿µÄ¡£²»¹ýºóÀ´¾³£·¢ÏÖÎÊÌ⣺File#renameTo(File)·½·¨»á·µ»ØÊ§°Ü(false)£¬ÎļþûÓÐÒÆ¶¯£¬Óֲ鲻³öÔÒò£¬ÔÙºóÀ´¸É´àÆúÓø÷½·¨£¬×Ô¼ºÊµÏÖÒ»¸öcopy·½·¨£¬ÎÊÌâµ¹ÊÇÔÙҲûÓгöÏÖ¹ý¡£
×òÌìÀϰåͬѧÓÖÓöµ½Õâ¸öÎÊÌ⣬File#rena ......