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

ÊÕ¼¯µ½µÄjava ÕýÔòÑéÖ¤

Java´úÂ룺
import java.util.regex.*;
public final class RegExpValidator
{
/**
* ÑéÖ¤ÓÊÏä
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean isEmail(String str)
{
String regex = "^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
return match(regex, str);
}

/**
* ÑéÖ¤IPµØÖ·
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean isIP(String str)
{
String num = "(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)";
String regex = "^" + num + "\\." + num + "\\." + num + "\\." + num + "$";
return match(regex, str);
}
/**
* ÑéÖ¤ÍøÖ·Url
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsUrl(String str)
{
String regex = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?";
return match(regex, str);
}
/**
* ÑéÖ¤µç»°ºÅÂë
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsTelephone(String str)
{
String regex = "^(\\d{3,4}-)?\\d{6,8}$";
return match(regex, str);
}

/**
* ÑéÖ¤ÊäÈëÃÜÂëÌõ¼þ(×Ö·ûÓëÊý¾Ýͬʱ³öÏÖ)
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsPassword(String str)
{
String regex = "[A-Za-z]+[0-9]";
return match(regex, str);
}

/**
* ÑéÖ¤ÊäÈëÃÜÂ볤¶È (6-18λ)
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ


Ïà¹ØÎĵµ£º

JavaÄÚ´æÊÍ·ÅÐĵÃ

1 Èç¹ûÒ»¿éÄÚ´æÇøÓòÄܹ»Öظ´ÀûÓã¬×îºÃ²»ÒªÉêÇëеġ£Õâ¸öÄÚ´æÇøÓòÓпÉÄÜÊÇϵͳµÄÒ»¸öÀ࣬×Ô¼ºµÄÒ»¸öÄÚ²¿ÓÐÊý×éÔªËØ£¬»òÕßÄܹ»·Å´óÁ¿Êý¾ÝµÄ½á¹¹¡£
2 ×îºÃ²»ÒªÔÚÑ­»·ÀïÃæÉêÇëÄڴ棬ѭ»·Ô½´ó£¬Ô½»µÊ¡£»»¾ä»°Ëµ£¬ÉêÇëÄÚ´æƵÂʱðÌ«¸ß¡£ºÃ±ÈÒ»¸öÈËÿ¶Ù³ÔÁ½Íë·¹ÕýºÃ£¬ÉíÌåµÄÏû»¯ÏµÍ³¿ÉÒÔ³ÐÊÜ£¬Èç¹ûÈÃËûÒ»¶Ù°ÑÊ®¶ÙµÄ¶¼³Ôµô£¬²»ÕÍ ......

java IO

JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£
¡¡¡¡Á ......

java´úÂëÁ¬½Óµ½oracleÊý¾Ý¿â

package com.deng.oracle;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class TestOracle {
public static void main(String[] args) {
try {
Class.forName("oracle.jdbc.driver.OracleDriv ......

IBM¼¼ÊõÉçÇø2009 Java רÇø×îÊÜ»¶Ó­ÄÚÈÝ

ת×Ô£ºIBM¼¼ÊõÉçÇø2009 Java רÇø×îÊÜ»¶Ó­ÄÚÈÝ
×îÊÜ»¶Ó­µÄÈÈÃÅÖ÷Ìâ

Web ¿ª·¢
2009
Ä꣬Web 2.0 Èȳ±´Ùʹ Web ¿ª·¢¼ÌÐø³ÉΪµ±Ç°×îÈÈÃŵÄÖ÷Ìâ¡£ÆäÖУ¬»ùÓÚ¶¯Ì¬ÓïÑÔ Goovy µÄÐÂÐË Web ¿ª·¢¿ò¼Ü Grails
³ÉΪÁ˱¸ÊÜÖõÄ¿µÄÐÂÐÇ¡£³ý´ËÖ®Í⣬Ðí¶à´«Í³µÄ»ùÓÚ Java ÓïÑ﵀ Web ¿ª·¢¿ò¼Ü£¬Èç Struts¡¢JSF¡¢GWT
µÈ£¬Ò²¶¼ÈÚÈë ......

Java ¸´Ï°±Ê¼Ç_µÚ3Ìì


Êý¾Ý½á¹¹ºÍËã·¨
ðÅÝ£ºÃ¿´Î±È½Ï¶¼¿ÉÕÒ³ö×î´ó»ò×îСµÄ£¬ÓÐÐòµÄÔÚ×îÓÒ±ß
Ñ¡ÔñÅÅÐò£ºÓÐÐòµÄÔÚ×î×ó±ß
²åÈëÅÅÐò£ºËٶȱÈðÅÝ¿ìÒ»±¶£¬±ÈÑ¡ÔñÒ²¿ì¡£
    
µÝ¹é
      
µ÷ÓÃ×ÔÉí
      
ººÅµËþÎÊÌ⣺
/**
* @ººÅµËþµÄÎÊÌâ
*/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ