java»ñÈ¡Ò»¸öÔÂÇ°µÄʱ¼ä
·½·¨Ò»£º
SimpleDateFormat formatter =
new
SimpleDateFormat(
"yyyyMMdd"
);
Date currentTime =
new
java.util.Date();
//
µÃµ½µ±Ç°ÏµÍ³Ê±¼ä
long
now = currentTime.getTime();
//
·µ»Ø×Ô
1970 Äê
1
ÔÂ
1
ÈÕ
00:00:00 GMT
ÒÔÀ´´Ë
Date
¶ÔÏó±íʾµÄºÁÃëÊý¡£
currentTime =
new
Date(now - 86400000 * 24);
long
now1 = currentTime.getTime();
currentTime =
new
Date(now1 - 86400000 * 6);
String current = formatter.format(currentTime);
current ΪµÃµ½µÄstringÀàÐ͵ÄÖµ
·½·¨¶þ£º
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar cal=Calendar.getInstance();
cal.add(Calendar.DATE, -1); //µÃµ½Ç°Ò»Ìì
cal.add(Calendar.MONTH, -1); //µÃµ½Ç°Ò»¸öÔÂ
long date = cal.getTimeInMillis();
Date kk=format.parse(df.format(new Date(date1)));
kkΪµÃµ½µÄʱ¼ä
Ïà¹ØÎĵµ£º
Java¶àÏ̱߳à³Ì×ܽá
ÏÂÃæÊÇJavaÏß³ÌϵÁв©ÎĵÄÒ»¸ö±àÄ¿£º
JavaỊ̈߳º¸ÅÄîÓëÔÀí
JavaỊ̈߳º´´½¨ÓëÆô¶¯
JavaỊ̈߳ºÏß³ÌջģÐÍÓëÏ̵߳ıäÁ¿
JavaỊ̈߳ºÏß³Ì״̬µÄת»»
JavaỊ̈߳ºÏ̵߳Äͬ²½ÓëËø
JavaỊ̈߳ºÏ̵߳Ľ»»¥
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÐÝÃß
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÓÅÏȼ¶
JavaỊ̈߳ºÏß ......
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-Èò½
Ï̵߳ÄÈò½º¬Òå¾ÍÊÇʹµ±Ç°ÔËÐÐ×ÅÏß³ÌÈóöCPU×ÊÔ´£¬µ«ÊÇÈ»¸ø˲»ÖªµÀ£¬½ö½öÊÇÈóö£¬Ïß³Ì״̬»Øµ½¿ÉÔËÐÐ״̬¡£
Ï̵߳ÄÈò½Ê¹ÓÃThread.yield()·½·¨£¬yield() Ϊ¾²Ì¬·½·¨£¬¹¦ÄÜÊÇÔÝÍ£µ±Ç°ÕýÔÚÖ´ÐеÄÏ̶߳ÔÏ󣬲¢Ö´ÐÐÆäËûÏ̡߳£
/**
* JavaỊ̈߳ºÏ̵߳ĵ÷¶È-Èò½
*
......
ÎÒÃǶ¼ÖªµÀÒ»¸ö¶ÔÏóֻҪʵÏÖÁËSerilizable½Ó¿Ú£¬Õâ¸ö¶ÔÏó¾Í¿ÉÒÔ±»ÐòÁл¯£¬javaµÄÕâÖÖÐòÁл¯Ä£Ê½Îª¿ª·¢ÕßÌṩÁ˺ܶà±ãÀû£¬ÎÒÃÇ¿ÉÒÔ²»±Ø¹Øϵ¾ßÌåÐòÁл¯µÄ¹ý³Ì£¬Ö»ÒªÕâ¸öÀàʵÏÖÁËSerilizable½Ó¿Ú£¬Õâ¸öµÄËùÓÐÊôÐԺͷ½·¨¶¼»á×Ô¶¯ÐòÁл¯¡£
È»¶øÔÚʵ¼Ê¿ª·¢¹ý³ÌÖУ¬ÎÒÃdz£³£»áÓöµ½ÕâÑ ......
JavaÌṩÁËÒ»Ì×»úÖÆÀ´¶¯Ì¬Ö´Ðз½·¨ºÍ¹¹Ôì·½·¨£¬ÒÔ¼°Êý×é²Ù×÷µÈ£¬ÕâÌ×»úÖƾͽЗ—·´Éä¡£·´Éä»úÖÆÊÇÈç½ñºÜ¶àÁ÷Ðпò¼ÜµÄʵÏÖ»ù´¡£¬ÆäÖаüÀ¨Spring¡¢HibernateµÈ¡£ÔÀíÐÔµÄÎÊÌâ²»ÊDZ¾ÎĵÄÖص㣬½ÓÏÂÀ´ÈÃÎÒÃÇÔÚʵÀýÖÐѧϰÕâÌ×¾«²ÊµÄ»úÖÆ¡£
1. µÃµ½Ä³¸ö¶ÔÏóµÄÊôÐÔ
public Object getProperty(Object owner, String f ......