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

JAVA ¶ÔÏóºÍÀà

String s = new Date().toString();¿ÉÒÔÖ±½Ó´´½¨ÍêжÔÏóºó¾ÍÁ¢¼´ÓÃÆäµÄ·½·¨¡£
Ò»¸ö¶ÔÏó±äÁ¿²¢Ã»ÓÐʵ¼Ê°üº¬Ò»¸ö¶ÔÏ󣬶øÊǽö½öÒýÓÃÒ»¸ö¶ÔÏó¡£
GregorianCalendarÀà
javaÉè¼ÆÕß¾ö¶¨°Ñ±£´æʱ¼äÓë¸øʱ¼äµãÃüÃû·Ö¿ªÀ´£¬ÕâÑù¾ÍÓÐÁ½¸öÀà,dateºÍGregorianCalendar.Ò»¸öÓÃÀ´±íʾʱ¼äµã£¬Ò»¸öÓÃÀ´±íʾ´ó¼ÒÊìϤµÄÈÕÀú±íʾ·¨¡£ÊÂʵÉÏgregorianCalendarÀ©Õ¹ÁËÒ»¸ö¸ü¼ÓͨÓõÄÀ࣬Õâ¸öÀàÃèÊöÁËÈÕÀúµÄÒ»°ãÊôÐÔ¡£Date¿ÉÒÔÓëGregorianCalendar»¥Ïàת»¯£¬gregorianCalendarÓиö·½·¨getTimeµÃµ½date¶ÔÏó¡£»òÕßsetTime¿ÉÒÔ°ÑÒ»¸ödate¶ÔÏó¸øÈÕÀúÀà¡£
»ùÓÚÀàµÄ·ÃÎÊȨÏÞ
Ò»¸ö·½·¨¿ÉÒÔ·ÃÎÊËùÊôÀàµÄËùÓжÔÏóµÄ˽ÓÐÊý¾Ý£¬Ç¿°É£¡
class Employee{
    private String name;
    boolean equals(Employee other){
        return name.equals(other.name);
    }   
}
nameÊÇ˽Óеģ¬µ«ÊÇÈ´¿ÉÒÔ·ÃÎÊËùÊôÀàEmployee¶ÔÏóµÄ˽ÓС£
private final Date hireDate;
½ö½öÒâζ×Å´¢´æÔÚhireDate±äÁ¿ÖеĶÔÏóÒýÓÃÔÚ¹¹ÔìÖ®ºó²»Äܱ»¸Ä±ä£¬µ«ÊDz¢²»ÒâζhireDateÊÇÒ»¸ö³£Á¿£¬ËûÒýÓõĶÔÏ󻹿ÉÒÔʹÓÃsetTime¸ü¸ÄÆ÷¸Ä±ä¡£
¾²Ì¬·½·¨¿ÉÒÔ·ÃÎÊ×ÔÉíÀàÖеľ²Ì¬Óò£¬ÒòΪËûÃǶ¼²»ÊǶԶÔÏó²Ù×÷£¬¶øÊÇÊôÓÚÀàµÄ¡£µ«ÊDz»ÄÜ·ÃÎÊʵÀýÓò¡£
ÿ¸öÎļþÖÐÖ»ÄÜÓÐÒ»¸ö¹«¹²À࣬²¢ÇÒÓëÎļþÃûÏàͬ£¬ÆäËûÀ಻ÄÜΪpublic¡£
·½·¨²ÎÊýµÄÁ½¸ö¸ÅÄî
Öµµ÷Óñíʾ·½·¨½ÓÊܵÄʵ÷ÓÃÕßÌṩµÄÖµ£¬¶øÒýÓõ÷Óñíʾ·½·¨½ÓÊܵÄÊǵ÷ÓÃÕßÌṩµÄ±äÁ¿µØÖ·¡£Ò»¸ö·½·¨¿ÉÒÔÐ޸Ĵ«µÝÒýÓÃËù¶ÔÓ¦µÄ±äÁ¿Öµ£¬¶ø²»ÄÜÐÞ¸ÄÖµµ÷ÓÃËù¶ÔÓ¦µÄ±äÁ¿Öµ¡£Java×ÜÊÇÖµµ÷Ó㬷½·¨µÃµ½µÄÊÇËùÓвÎÊýÖµµÄÒ»¸ö¿½±´£¬·½·¨²»ÄÜÐ޸Ĵ«µÝ¸øËûµÄÈκβÎÊý±äÁ¿µÄÄÚÈÝ¡£»ù±¾±äÁ¿¾Í²»ËµÁË£¬Èç¹û´«µÝµÄÊÇÒ»¸öÒýÓöÔÏóµØÖ·µÄ±äÁ¿Ò²ÊÇͬÑù£¬ÔÚ·½·¨Àï¿ÉÒԸıäÕâ¸ö±äÁ¿µÄÖµ£¬Ã²ËÆÒѾ­ÐÞ¸ÄÁËÕâ¸ö±äÁ¿£¬ÄÇôÕâ¸ö±äÁ¿ÒýÓõÄÒ²²»ÊÇÄǸö¶ÔÏóµÄµØÖ·ÁË£¬µ«ÊdzöÁË·½·¨£¬ÄǸö±äÁ¿»¹ÊÇÒýÓõÄÄǸö¶ÔÏóµÄµØÖ·¡£Õâ¾ÍÊÇ˵JavaÀ´ËµÒ»Ö±¶¼ÊÇÖµµ÷Óá£ÓÀÔ¶²»»á¸Ä±ä´«µÝ¹ýÀ´µÄ²ÎÊý£¬ÒòΪÐ޸ĵÄÖ»ÊÇÕâЩ²ÎÊýµÄ¿½±´£¬²»¹ÜÊÇ»ù±¾ÀàÐ͵IJÎÊý£¬»¹ÊÇÒýÓöÔÏóµØÖ·µÄ±äÁ¿²ÎÊý¡£
×ܽáÒ»ÏÂJavaÉè¼ÆÓïÑÔÖз½·¨²ÎÊýµÄʹÓÃÇé¿ö
1. Ò»¸ö·½·¨²»ÄÜÐÞ¸ÄÒ»¸ö»ù±¾Êý¾ÝÀàÐ͵IJÎÊý
2. Ò»¸ö·½·¨¿ÉÒÔÐÞ¸ÄÒ»¸ö²ÎÊýÒýÓõĶÔÏóµÄ״̬¡£
3. Ò»¸ö·½·¨²»ÄÜʵÏÖÈöÔÏó²ÎÊýÒýÓÃÒ»¸öеĶÔÏó¡£
ÖØÔØ
Èç¹û¶à¸ö·½·¨ÓÐÏàͬµ


Ïà¹ØÎĵµ£º

Java²Ù×÷Excel Poi¼ò½é


 
Ò»£®POI¼ò½é
Jakarta POI ÊÇapacheµÄ×ÓÏîÄ¿£¬Ä¿±êÊÇ´¦Àíole2¶ÔÏó¡£ËüÌṩÁËÒ»×é²Ù×ÝWindowsÎĵµµÄJava API
Ä¿Ç°±È½Ï³ÉÊìµÄÊÇHSSF½Ó¿Ú£¬´¦ÀíMS Excel£¨97-2002£©¶ÔÏó¡£Ëü²»ÏóÎÒÃǽö½öÊÇÓÃcsvÉú³ÉµÄûÓиñʽµÄ¿ÉÒÔÓÉExcelת»»µÄ¶«Î÷£¬¶øÊÇÕæÕýµÄExcel¶ÔÏó£¬Äã¿ÉÒÔ¿ØÖÆһЩÊôÐÔÈçsheet,cellµÈµÈ¡£
¶þ£®HSSF¸Å¿ö
......

¡¶JavaÓëģʽ¡·Ñ¡¶Á¡°Ô­Ê¼Ä£ÐÍ£¨Prototype£©Ä£Ê½¡±

Õâ±¾ÊéÏêϸ½²½âÁËģʽÀíÂÛµÄÓÉÀ´£¨ºÜ¶àÈË¿ÉÄܲ»ÖªµÀģʽÀíÂÛÓëÖйúµÀ¼Ò˼ÏëµÄÔ¨Ô´£©£¬ÃæÏò¶ÔÏóµÄÈí¼þÉè¼ÆÔ­Ôò£¬Ò»Ö±½²µ½¶þÊ®¼¸¸öÉè¼Æģʽ£¬ÒÔ¼°ÕâЩģʽÔÚJavaÓïÑÔÖеÄʵÏֵȵȡ£ÊéÖиø³öÁË´óÁ¿À´×Ô»ª¶û½ÖϵͳµÄÕæʵÏîÄ¿µÄÀý×Ó£¬ÓÃÀ´½²½âÉè¼ÆģʽÔÚϵͳÉè¼ÆÖеÄÓ¦ÓᣠÕâ±¾Êé´¦ÓÚÀíÂÛºÍʵ¼ùÖ®¼ä£¬ÊÇÒ»±¾¶¨Î»¶ÀÌØ¡¢·ç¸ñ¶ÀÌص ......

JavaÀàÐÞÊηûºÍ³ÉÔ±±äÁ¿¡¢º¯ÊýÐÞÊηûÓë·ÃÎÊȨÏÞ

1¡¢JavaÐÞÊηû Java           ·ÃÎÊȨÏÞ\
Àà³ÉÔ±±äÁ¿¡¢º¯ÊýÐÞÊηû ±¾Àà Î޼̳йØϵ
ͬһ°ü Î޼̳йØϵ
²»Í¬°ü ¼Ì³Ð¹Øϵ£¨×ÓÀࣩ
ͬһ°ü ¼Ì ......

Java ×Ö·û´®,byte[],16½øÖƵÄ×Ö·û´®»¥×ª

ÔÚµ÷ÊÔµÄʱºò£¬Èç¹ûÒªÏÔʾbyteµÄÖµÊÇ·ñÓëÔ¤ÆÚÒ»Ö£¬Ò»°ãת»»Îª16½øÖƵÄ×Ö·û´®£¬»òÕßʹÓÃbase64ת»»ºó£¬È»ºóÏÔʾ³öÀ´¡£
/**
* ×Ö·û´®×ª»»³ÉÊ®Áù½øÖÆ×Ö·û´®
*/
public static String str2HexStr(String str) {
char[] chars = "0123456789ABCDEF".toCharArray();
StringBuilder sb = new StringBuilder(""); ......

Java»ù±¾ÀàÐÍ

from
http://hi.baidu.com/18276393/blog/item/f6efc9d77ee7bc2806088b61.html
Ô­ÎÄ
»ù±¾ÀàÐÍ£¬»òÕß½Ð×öÄÚÖÃÀàÐÍ£¬ÊÇJAVA
ÖÐ
²»Í¬ÓÚÀàµÄÌØÊâÀàÐÍ¡£ËüÃÇÊÇÎÒÃDZà³ÌÖÐʹÓÃ×îƵ·±µÄÀàÐÍ£¬Òò´ËÃæÊÔ
ÌâÖÐÒ²×ÜÉÙ²»ÁËËü
ÃǵÄÉíÓ°£¬ÔÚÕâƪÎÄÕÂÖÐÎÒÃǽ«´ÓÃæÊÔÖг£¿¼µÄ¼¸¸ö·½ÃæÀ´»Ø¹ËÒ»ÏÂÓë»ù±¾ÀàÐÍÏà¹ØµÄ֪ʶ¡£
»ù±¾ÀàÐ͹²Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ