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

JavaµÄʱ¼ä´¦Àí(Ðø)

¸ÅÊö
Èç¹ûÄãÖªµÀÔõÑùÔÚjavaÖÐʹÓÃÈÕÆÚ£¬ÄÇôʹÓÃʱ¼äºÍËü²Å²»¶àÒ»Ñù¼òµ¥¡£ÕâƪÎÄÕ¸æËßÄãÔõÑù°ÑËûÃǵIJî±ðÁªÏµÆðÀ´¡£Robert Nielsen»¹¸æËßÄãÔõÑùʹÓÃjavaÀ´¼ÆËãµÖ´ïº½°àºÍÖÆÔì¹ý³ÌµÄʱ¼ä¡£
×÷ÕߣºRobert Nielsen
·­Ò룺Cocia Lin
ÕâƪÎÄÕÂÊÇÔÚÎÒ·¢±í¹ýµÄ<¼ÆËãJavaʱ¼ä>(ÒëÕß:ÒѾ­·­ÒëÍê³É)µÄ»ù´¡Éϵġ£ÔÚÕâÀÎÒÁгöÄÇƪÎÄÕ¼¸¸öÄãÓ¦¸ÃÊìϤµÃ¹Ø¼üµã¡£Èç¹ûÕ⼸µãÄ㲻̫Çå³þ£¬ÎÒ½¨ÒéÄã¶ÁÒ»ÏÂ<¼ÆËãJavaʱ¼ä>£¬Á˽âһϡ£
1. Java¼ÆËãʱ¼äÒÀ¿¿1970Äê1ÔÂ1ÈÕ¿ªÊ¼µÄºÁÃëÊý.
2. DateÀàµÄ¹¹Ô캯ÊýDate()·µ»Ø´ú±íµ±Ç°´´½¨µÄʱ¿ÌµÄ¶ÔÏó¡£DateµÄ·½·¨getTime()·µ»ØÒ»¸ölongÖµÔÚÊýÖµÉϵÈÓÚ1970Äê1ÔÂ1ÈÕ֮ǰ»òÖ®ºóµÄʱ¿Ì¡£
3. DateFormatÀàÓÃÀ´×ª»»Dateµ½String,·´Ö®ÒàÈ»¡£¾²Ì¬·½·¨getDateInstance()·µ»ØDateFormatµÄȱʡ¸ñʽ£»getDateInstance(DateFormat.FIELD)·µ»ØÖ¸¶¨µÄDateFormat¶ÔÏó¸ñʽ¡£Format(Date d)·½·¨·µ»ØString±íʾÈÕÆÚ£¬ÀýÈ磢January 1,2002.£¢·´¹ýÀ´£¬parse(String s)·½·¨·µ»ØÒÔ²ÎÊý×Ö·û´®±íʾµÄDate¶ÔÏó¡£
4. format()·½·¨·µ»ØµÄ×Ö·û´®¸ñʽ¸ù¾Ý²»Í¬µØÇøµÄʱ¼äÉèÖöøÓÐËù²»Í¬¡£
5. GregorianCalendearÀàÓÐÁ½¸öÖØÒªµÄ¹¹Ô캯Êý£ºGregorianCalerdar(),·µ»Ø´ú±íµ±Ç°´´½¨Ê±¼äµÄ¶ÔÏó£»GregorianCalendar(int year,int month,int date)·µ»Ø´ú±íÈÎÒâÈÕÆڵĶÔÏó¡£GregorianCalendarÀàµÄgetTime()·½·¨·µ»ØÈÕÆÚ¶ÔÏó¡£Add(int field,int amount)·½·¨Í¨¹ý¼Ó»ò¼õʱ¼äµ¥Î»£¬ÏóÌìÊý£¬ÔÂÊý»òÄêÊýÀ´¼ÆËãÈÕÆÚ¡£
GregorianCalendarºÍ ʱ¼ä
Á½¸öGregorianCalendarµÄ¹¹Ô캯Êý¿ÉÒÔÓÃÀ´´¦Àíʱ¼ä¡£Ç°Õß´´½¨Ò»¸ö±íʾÈÕÆÚ£¬Ð¡Ê±ºÍ·ÖÖӵĶÔÏó£º
GregorianCalendar(int year, int month, int date, int hour, int minute)
µÚ¶þ¸ö´´½¨Ò»¸ö±íʾһ¸öÈÕÆÚ£¬Ð¡Ê±£¬·ÖÖÓºÍÃ룺
GregorianCalendar(int year, int month, int date, int hour, int minute, int second)
Ê×ÏÈ£¬ÎÒÓ¦¸ÃÌáÐÑһϣ¬Ã¿Ò»¸ö¹¹Ô캯ÊýÐèҪʱ¼äÐÅÏ¢ÖеÄÈÕÆÚÐÅÏ¢(Ä꣬Ô£¬ÈÕ)¡£Èç¹ûÄãÏë˵2:30 p.m.,Äã±ØÐëÖ¸³öÈÕÆÚ¡£
ͬÑù£¬Ã¿Ò»¸öGregorianCalendar¹¹Ô캯Êý´´½¨Ò»¸öÔÚʱ¼äÉÏʹÓúÁÃë¼ÆËãµÄ¶ÔÏó¡£ËùÒÔ£¬Èç¹ûÄãµÄ¹¹Ô캯ÊýÖ»ÌṩÄ꣬Ô£¬ÈÕ²ÎÊý£¬ÄÇСʱ£¬·ÖÖÓ£¬ÃëºÍºÁÃëµÄÖµ½«±»ÖÃ0.
DateFormatºÍʱ¼ä
Äã¿ÉÒÔʹÓþ²Ì¬·½·¨getDateTimeInstance(int dateStyle,int timeStyle)À´½¨Á¢DateFormat¶ÔÏóÀ´ÏÔʾʱ¼äºÍÈÕÆÚ¡£Õâ¸ö·½·¨±íÃ÷ÄãÏëÒªµÄÈÕÆÚºÍʱ¼ä¸ñʽ¡£Èç¹ûÄãϲ»¶Ê¹ÓÃȱʡ¸ñʽ£¬¿ÉÒÔÊ


Ïà¹ØÎĵµ£º

Êý¾Ý¿âÓëjavaµÄ¼¸¸ö¸ÅÄî

MDAC¡¢DAO¡¢ADO¡¢OLE DB¡¢ODBCÊÇʲô¹Øϵ
MDAC£¨Microsoft Data Access Components£©ÊÇ΢ÈíÊý¾Ý¿â·ÃÎÊ×é¼þ£¬NetpiseºÍÐí¶àÀûÓÃÊý¾Ý¿âµÄÈí¼þ¶¼ÐèÒª²Ù×÷ϵͳ°²×°MDAC¡£ºÜ¶àÓû§µÄ²Ù×÷ϵͳÖÐÒѾ­´æÔÚÁËMDAC£¬ÓÐЩÊDzÙ×÷ϵͳÄÚÖõġ¢ÓÐЩÊÇÆäËüÓ¦ÓóÌÐò°²×°µÄ¡£
ÔÚ MDAC ÖÐÓÐÈýÖÖÖ÷Òª¼¼Êõ£º
¡¡¡¡£¨1£©ActiveX Êý¾Ý¶ÔÏó (ADO) ......

Java°²È«±à³Ì±Ê¼Ç¡¾1¡¿ »ù±¾¹¤¾ß¼ò½é¡£


1.1 J2SE
µÄÖ÷Òª¹¤¾ß
»ù±¾¹¤¾ß£º
javac
  
Java
±à³ÌÓïÑԵıàÒëÆ÷¡£±¾Êé¸÷ÕµijÌÐò¶¼ÊÇÔÚ
DOS
´°¿ÚÖÐͨ¹ýÖ´ÐÐ
"javac
ÎļþÃû

À´±àÒë
Java
³ÌÐòµÄ¡£ÎļþÃû±ØÐëÒÔ
.java
Ϊºó׺£¬±àÒëÒÔºóÉú³É
.class
Ϊºó׺µÄ×Ö½ÚÂëÎļþ¡£
java
ÓÃÓÚÖ´ÐÐ
Java
Ó¦ÓóÌÐò¡£±¾Êé¸÷ÕÂµÄ³Ì ......

¹ØÓÚjavaµÄhashCode·½·¨

JavaÖеļ¯ºÏ£¨Collection£©ÓÐÁ½À࣬һÀàÊÇList£¬ÔÙÓÐÒ»ÀàÊÇSet¡£ÄãÖªµÀËüÃǵÄÇø±ðÂð£¿Ç°Õß¼¯ºÏÄÚµÄÔªËØÊÇÓÐÐòµÄ£¬ÔªËØ¿ÉÒÔÖظ´£»ºó
ÕßÔªËØÎÞÐò£¬µ«ÔªËز»¿ÉÖظ´¡£ÄÇôÕâÀï¾ÍÓÐÒ»¸ö±È½ÏÑÏÖصÄÎÊÌâÁË£ºÒªÏë±£Ö¤ÔªËز»Öظ´£¬¿ÉÁ½¸öÔªËØÊÇ·ñÖظ´Ó¦¸ÃÒÀ¾ÝʲôÀ´ÅжÏÄØ£¿Õâ¾ÍÊÇ
Object.equals·½·¨ÁË¡£µ«ÊÇ£¬Èç¹ûÿÔö¼ÓÒ»¸öÔªËØ ......

Java·ºÐÍ

Java·ºÐÍ
ÓÉC++µÄÄ£°åº¯ÊýÒýÈë×Ô¶¨Òå·ºÐÍ
ÈçϺ¯ÊýµÄ½á¹¹ºÜÏàËÆ£¬½öÀàÐͲ»Í¬£º
int add(int x, int y) { return x + y;}
float add(float x, float y) { return x + y;}
double add(double x ,double y) {return x + y;}
C++ÓÃÄ£°åº¯Êý½â¾ö£¬Ö»Ð´Ò»¸öͨÓ÷½·¨£¬Ëü¿ÉÒÔÊÊÓ¦¸÷ÖÖÀàÐÍ£¬Ê¾Òâ´úÂëÈçÏ£º
T add(T x, T y) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ