java ±È½Ïʱ¼ä
1. import java.text.DateFormat;
2. import java.text.ParseException;
3. import java.util.Date;
4.
5. /**
6. * @description 計ËãÁ½¸öÈÕÆÚÏà²îµÄÌìÊý
7. * @author ZhouJingxian
8. *
9. */
10. public class CountDate {
11.
12. /**
13. * @param args
14. */
15. public static void main(String[] args) {
16. Date earlydate = new Date();
17. Date latedate = new Date();
18. DateFormat df = DateFormat.getDateInstance();
19. try {
20. earlydate = df.parse("2009-07-01" );
21. latedate = df.parse("2009-08-05" );
22. } catch (ParseException e) {
23. e.printStackTrace();
24. }
25.
26. int days = daysBetween(earlydate,latedate);
27.
28. System.out.println(days);
29. }
30.
31. /**
32. * 計ËãÁ½¸öÈÕÆÚÏà²îµÄÌìÊý
33. * @param early 開ʼÈÕÆÚ
34. * @param late 結ÊøÈÕÆÚ
35. * @return
36. */
37. public static final int daysBetween(Date early, Date late) {
38. java.util.Calendar calst = java.util.Calendar.getInstance();
39. java.util.Calendar caled = java.util.Calendar.getInstance();
40. calst.setTime(early);
41. caled.setTime(late);
42. //ÉèÖÃʱ¼äΪ0 ʱ
43. calst.set(java.util.Calendar.HOUR_OF_DAY, 0 );
44. calst.set(java.util.Calendar.MINUTE, 0 );
45. calst.set(java.util.Calendar.SECOND, 0 );
46. caled.set(java.util.Calendar.HOUR_OF_DAY, 0 );
47. caled.set(java.util.Calendar.MINUTE, 0 );
48. caled.set(java.util.Calendar.SECOND, 0 );
49.
50. //µÃµ½Á½¸öÈÕÆÚÏà²îµÄÌìÊý
51. int days = ((int) (caled.getTime().getTim
Ïà¹ØÎĵµ£º
Java 6 RowSet ʹÓÃÍêÈ«ÆÊÎö(3)
¹Ø¼ü×Ö: rowset
Çåµ¥ 24. Çåµ¥ 23 ÖеĴúÂëÖ´Ðнá¹û
1 Tom Tom is VIP. 2 Jim null
ÏÂÃæÒ»½ÚÀïÎÒÃǽ«»á¿´µ½ JdbcRowSet ÈçºÎ×÷Ϊһ¸ö RowSet ºÍÆäËûµÄ RowSet Ò»ÆðʹÓá£
ʹÓà JoinRowSet
Ö§³ÖµÄÁªºÏ·½Ê½
JoinRowSet ½Ó¿ÚÖжÔÎåÖÖ²»Í¬µÄÁªºÏ·½Ê½¶¼¶¨ÒåÁ˶ÔÓ¦µÄ³£ÊýºÍÅжϸÃʵÏÖÊÇ·ñÖ ......
Oracle and Sun
http://www.oracle.com/events/productstrategy/index.html
Oracle + Sun: Java Strategy
http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12630/lobby_external_flash_clean_480x360/default.htm
Oracle + Sun: Java Strategy
......
Ò»¡¢ÈçºÎ°²×°JDK£¿
µ±ÎÒÃÇ´ÓÍøÂçÉÏDOWNÏÂJ2SE 5.0 JDKÒÔºó£¨ÊÇÒ»¸ö¿ÉÖ´ÐÐÎļþ£¬ÎļþÃû½Ð×öjdk-1_5_0-windows-i586.exe£¬µ±È»Õâ¸öÃû×Ö»áÒòΪ¶ÔÓ¦²Ù×÷ϵͳµÄ²»Í¬¶øÓÐËùÇø±ðµÄ£¬ÎÒʹÓõIJÙ×÷ϵͳ¾ÍÊÇWINDOWS£¬´ó¼Ò·¢ÏÖÁËÂ𣿣©£¬Ë«»÷Ëû¾Í¿ªÊ¼°²×°ÁË¡£ÐèҪעÒâµÄ¾ÍÊÇÑ¡Ôñ°²×°Â·¾¶µÄÎÊÌâ ......