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

java String.Format() ÈÕÆÚ¸ñʽÓ÷¨

 Ô­ÎÄ´«ËÍÃÅ£ºhttp://solodu.javaeye.com/blog/454546
JDK1.5ÖУ¬StringÀàÐÂÔöÁËÒ»¸öºÜÓÐÓõľ²Ì¬·½·¨String.format():ÏÖÓÐÒ»¸öʱ¼ä'20090903'Ҫת»¯³ÉÖ¸¶¨Ê±¼äµÄjava.util.Date¸ñʽ
private Date getStartGregorianTime(String date) {
Date d_date = DateUtil.parseDate(date);
int year = new Integer(String.format("%tY", d_date));
int month = new Integer(String.format("%tm", d_date));
int day = new Integer(String.format("%td", d_date));

return new GregorianCalendar(year, month-1, day, 0, 0, 0).getTime();
}

private Date getEndGregorianTime(String date) {
Date d_date = DateUtil.parseDate(date);
int year = new Integer(String.format("%tY", d_date));
int month = new Integer(String.format("%tm", d_date));
int day = new Integer(String.format("%td", d_date));

return new GregorianCalendar(year, month-1, day, 23, 59, 59).getTime();
}

ÒÔÏÂΪString format()ÖвÎÊýµÄ¶¨Òå:
ÈÕÆÚ/ʱ¼äת»»
ÒÔÏÂÈÕÆÚºÍʱ¼äת»»µÄºó׺×Ö·ûÊÇΪ 't' ºÍ 'T' ת»»¶¨ÒåµÄ¡£ÕâЩÀàÐÍÏàËÆÓÚµ«²»ÍêÈ«µÈͬÓÚÄÇЩÓÉ GNU date ºÍ POSIX strftime(3c) ¶¨ÒåµÄÀàÐÍ¡£ÌṩÆäËûת»»ÀàÐÍÊÇΪÁË·ÃÎÊÌض¨ÓÚ Java µÄ¹¦ÄÜ£¨È罫 'L' ÓÃ×÷ÃëÖеĺÁÃ룩¡£
ÒÔÏÂת»»×Ö·ûÓÃÀ´¸ñʽ»¯Ê±¼ä£º
'H'     24 СʱÖƵÄСʱ£¬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄÁ½Î»Êý£¬¼´ 00 - 23¡£
'I'     12 СʱÖƵÄСʱ£¬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄÁ½Î»Êý£¬¼´ 01 - 12¡£
'k'     24 СʱÖƵÄСʱ£¬¼´ 0 - 23¡£
'l'     12 СʱÖƵÄСʱ£¬¼´ 1 - 12¡£
'M'     СʱÖеķÖÖÓ£¬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄÁ½Î»Êý£¬¼´ 00 - 59¡£
'S'     ·ÖÖÓÖеÄÃ룬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄÁ½Î»Êý£¬¼´ 00 - 60 £¨"60" ÊÇÖ§³ÖÈòÃëËùÐèµÄÒ»¸öÌØÊâÖµ£©¡£
'L'     ÃëÖеĺÁÃ룬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄÈýλÊý£¬¼´ 000 - 999¡£
'N'     ÃëÖеĺÁ΢Ã룬±»¸ñʽ»¯Îª±ØҪʱ´øÇ°µ¼ÁãµÄ¾ÅλÊý£¬¼´ 000000000 - 999999999¡£
'p'     Ìض¨ÓÚÓïÑÔ»·¾³µÄ ÉÏÎç»òÏÂÎç ±ê¼ÇÒÔСдÐÎʽ±íʾ£¬ÀýÈç "am" »ò "pm"¡


Ïà¹ØÎĵµ£º

¹ØÓÚc#ºÍjavaÖÐÊý×éµÄ±È½Ï

 javaÖÐʹÓöþά Êý×é
ognNf_v
public class Array2D...{
m @EvM)y0e2r
s
    public static void main(String[] args)...{JAVAÖÐÎÄÕ¾ÉçÇøÃÅ»§ ~j!lSR ^ z5bR5O
        int myInt[][]=new int[5][10];
@XH3ao\
        ......

javaʵÏÖÑ­»·×óÒƺÍÓÒÒƵļòµ¥Ëã·¨

 byte a=112,ÓóÌÐòʵÏÖ£¬½«ÆäÑ­»·×óÒÆÈýλºÍÓÒÒÆÈýλ¡£
112µÄ¶þ½øÖÆÔ­Âë:0111 0000
112Ñ­»·×óÒÆ3λºóµÄ¶þ½øÖÆÂë:1000 0011
112Ñ­»·ÓÒÒÆ3λºóµÄ¶þ½øÖÆÂë:0000 1110
ÏȽ«Ñ­»·×óÒƵijÌÐò´úÂë¸æËß´ó¼Ò:
public class TestCircle{
 public static void main(String args[]){
  byte x=112;
 & ......

java WEBÈí¼þ¿ª·¢ÖеÄһЩÌå»á

java WEBÈí¼þ¿ª·¢ÖеÄһЩÌå»á£¬ËüÓÉһϵÁÐ֪ʶ×é³É£¬ÎªÁËʵÏÖÒ»¸ö¹²Í¬µÄÄ¿µÄ£¬¼´Ò»¸ö°²È«£¬Îȶ¨£¬¿ÉÀ©Õ¹µÄÈí¼þ¡£
×ܽáÈçÏ£º
1  java»ù´¡
2  ²Ù×÷ϵͳ£¨windows£¬linux£¬unixµÈ£©
3  Êý¾Ý¿â£¨oracle£¬mysql£¬sqlserver£©
4  jsp£¨html£¬css£¬javascript£¬Ajax£¬XMLµÈ£©
5  Jsp·þÎñÆ÷£¨tomc ......

Javaͬ²½´úÂëתÒì²½´úÂë

Javaͬ²½´úÂëתÒì²½´úÂë
Kagula
2009-11-18
ÕªÒª
Thread   Thread Group
¸ÅÒª
   ÀûÓÃJavaÔ´Â룬½éÉÜͬ²½´úÂëתÒì²½´úÂë¿ò¼ÜµÄʹÓã¬Ï°벿·Ý¸½¿ò¼ÜÔ´´úÂ룬ÔĶÁ±¾ÎÄ֮ǰ¿ÉÒԲο¼¡¶Java¶àÏß³Ì_±à³ÌÄ£ÐÍÑо¿¡·http://blog.csdn.net/lee353086/archive/2008/01/10/2033587.aspx
 
ÕýÎÄ
Tes ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ