javaÖÐÅжÏ×Ö·û´®ÊÇ·ñΪÊý×ÖµÄÈýÖÖ·½·¨
javaÖÐÅжÏ×Ö·û´®ÊÇ·ñΪÊý×ÖµÄÈýÖÖ·½·¨
1>ÓÃJAVA×Ô´øµÄº¯Êý
public static boolean isNumeric(String str){
for (int i = str.length();--i>=0;){
if (!Character.isDigit(str.charAt(i))){
return false;
}
}
return true;
}
2>ÓÃÕýÔò±í´ïʽ
public static boolean isNumeric(String str){
Pattern pattern = Pattern.compile("[0-9]*");
return pattern.matcher(str).matches();
}
3>ÓÃasciiÂë
public static boolean isNumeric(String str){
for(int i=str.length();--i>=0;){
int chr=str.charAt(i);
if(chr<48 || chr>57)
return false;
}
return true;
}
4>ÓÃÒì³£
public static boolean isNumeric(String str){
try{
Integer.parseInt(str);
}
catch(NumberFormatException ne){
return false;
}
return true;
}
Ïà¹ØÎĵµ£º
JAVAÖ®IOÁ÷(³¬ÏêϸµÄJava.io°üµÄ½éÉÜ!)
Ò».InputºÍOutput
1.stream´ú±íµÄÊÇÈκÎÓÐÄÜÁ¦²ú³öÊý¾ÝµÄÊý¾ÝÔ´£¬»òÊÇÈκÎÓÐÄÜÁ¦½ÓÊÕÊý¾ÝµÄ½ÓÊÕÔ´¡£
ÔÚJavaµÄIOÖУ¬ËùÓеÄstream£¨°üÀ¨InputºÍOut stream£©¶¼°üÀ¨Á½ÖÖÀàÐÍ£º
1.1 ÒÔ×Ö½ÚΪµ¼ÏòµÄstream
ÒÔ×Ö½ÚΪµ¼ÏòµÄstream£¬±íʾÒÔ×Ö½ÚΪµ¥Î»´ÓstreamÖжÁÈ¡»òÍùstreamÖÐдÈëÐÅÏ ......
package com.svse.dao;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class UserDAO {
/*
* javaµ÷Óô洢¹ý³Ì
*/
public int addUser(String username,int userage)
{
Connection conn = null;
int useri ......
LGameÊÇLoonframework¿ò¼ÜµÄÒ»²¿·Ö£¬Ò²ÊÇÕë¶ÔJava2DÓÎÏ·¿ª·¢¶øÉè¼ÆµÄ“Ò»À¿×Ó”ÏîÄ¿£¬ËüµÄ´´Á¢³õÖÔÔÚÓÚ¹¹½¨Ò»¸ö¸ßЧÇÒÍêÉƵÄJava2DÓÎÏ·¿ª·¢Ìåϵ¡£
·¢²¼Ê±¼ä
°æ±¾ºÅ
2009-12-29
0.2.5
2009-10-10
0.2.0
2009-09-13
0.1.5
2009-08-11
0.1.0
2009-12-29 LGame-Simple-0.2.5 ......
1¡¢Timer½éÉÜ
½¨Á¢ÈÎÎñ£ºÊ¹ÓÃTimerµ÷¶ÈµÄÈÎÎñÓ¦¸Ã¼Ì³ÐTimerTask³éÏóÀ࣬¸ÃÀàʵÏÖRunnable½Ó¿Ú£¬ÒòЩ¾ß±¸¶àÏ̵߳ÄÄÜÁ¦£¬ÊµÏָýӿڵÄrun·½·¨£¬¸Ã·½·¨ÊÇÐèÒª¸ß¶ÈµÄÈÎÎñÖ´ÐÐÌå¡£
µ÷¶ÈÈÎÎñ£ºµ÷¶ÈÈÎÎñͨ¹ýTimerÀàÍê³É,µ÷¶ÈÈÎÎñͨ¹ýschedul·½·¨Íê³É£¬²éÒ»ÏÂjava docÎĵµ:
Java´úÂë
void schedule(TimerTask task, Date tim ......