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

JAVAÈÕÆÚ¸ñʽÎÊÌâ SimpleDateFormat·½·¨

1¡¢±ØÐëÒýÈ룺java.text.SimpleDateFormat
2¡¢ÉèÖÃÏÔʾ·½Ê½£¬µ÷ÓÃformat¸ñʽ¡£
    SimpleDateFormat sdf=new SimpleDateFormat("yyyyÄêMMÔÂddÈÕ");
     String date=sdf.format(blog.getCreatedTime());
    
     sdf=new  SimpleDateFormat("HH:mm:ss");
     String time=sdf.format(blog.getCreatedTime());
¿ÉÄܳöÏÖ´íÎó£º
Cannot format given Object as a Date
½â¾ö:¼ì²éblog.getCreatedTime()·µ»ØµÄÊý¾ÝÀàÐÍÊÇ·ñΪDate...Òòsdf.format()ÖеIJÎÊýÐèΪDateÀàÐÍ;


Ïà¹ØÎĵµ£º

JavaÖм¯ºÏÈÝÆ÷ÀàListºÍSetµÄÓ÷¨

ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1  List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......

´«ÖDz¥¿ÍjavaÅàѵ java»ù´¡Ö®MYSQL

³é¿Õ¸´Ï°ÁËÏÂÕýÔò±í´ïʽµÄÓ÷¨£¬ºÜ¶àÇ°Á½¸öÔÂѧЩµÄ¶«Î÷£¬ÏÖÔÚ¶¼ÊÖÉúÁË£¬Ö»Óв»¶ÏµÄ¸´Ï°²ÅÄÜ×öµ½ÕÆÎÕ£¡
½ñÌ쿪ʼ½²Êý¾Ý¿âÁË£¬MYSQL£¬È»ºóÂíÉϾͻῪʼ½Ó´¥¿ò¼Ü····¹þ¹þ£¬ÒªÕæµÄ¿ªÊ¼×öÏîÄ¿ÁË
¼¤¶¯¹þ¡£¡£¡£¡£
ÕýÔò±í´ïʽÊÇ´ÓJDK1.5Ö®ºóÍƳöµÄ¼ò»¯×Ö·û´®²Ù×÷µÄ£¬ÓÃÌØÊâµÄ·ûºÅ´ú±í¶Ô×Ö·û´®µÄÔËÓ ......

java web/tomcatÏîÄ¿ÖÐDateÀà»ñȡʱ¼ä²»ÕýÈ·µÄÎÊÌâ

ÕâÁ½Ìì×öÒ»¸öwebÏîÄ¿,Êý¾Ý¿âÖÐÓиö×Ö¶ÎΪÉϴεǼµÄʱ¼ä,ËùÒÔÐèÒªÔÚÓû§µÇ¼µÄʱºò¼Ç¼ÏÂʱ¼ä ûÓÃcalendar ÓÃÁËDateÀà,ͻȻ·¢ÏÖsystem.out.println(date)µÄʱºòʱ¼ä±È±±¾©Ê±¼äÍíÁË8¸öСʱ£¨»¹ÊÇÔçÁË,·´ÕýÊDzî8¸öСʱ£© ×Ðϸһ¿´ÏµÍ³Ê±¼ä ÍêÈ«ÕýÈ·,µ±Ê±ÒÔΪÊÇjdk sbÁËÏ µ÷ÊÔÁË°ëÌì·¢ÏÖÔõô¶¼²»¶Ô
¶øн¨Ò»¸öjava project ......

Java+FlexÕûºÏÓ¦Óüòµ¥Ê¾Àý (mx:RemoteObject)

1.java
Java´úÂë
package com;    
  
public class LoginDemo {    
        
    public String validate(String username,String password){    
   &nb ......

javaÒì³£»úÖƼòÒª·ÖÎö

×òÌì¿´µ½Ò»¸öÌâÄ¿£ºjavaÒì³£»úÖƺÍÀ¬»ø´¦Àí»úÖÆ£¬·¢ÏÖƽʱÓõÄʱºòҲû̫עÒ⣬ÄùýÀ´¾ÍÓá£Ñ§Ï°ÕⶫÎ÷¾ÍµÃ²»¶Ï×ܽᡢ»ýÀÛ£¬²»È»Ê±¼ä³¤»¹Ë­»¹¼ÇµÃËü³¤É¶Ñù¡£
javaÒì³£»ù±¾¸ÅÄî¾Í²»ÓÃ˵ÁË£¬
javaÒì³£Ö÷Òª·ÖΪÈýÀࣺ
  1£©±àÒëʱÒì³£java.lang.Exception
   2)ÔËÐÐʱÒì³£ java.lang.RuntimeException
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ