JavaÈÕÆÚ¸ñʽ»¯³£Ó÷½·¨
JavaÖÐDateÀàÖеÄһЩÈÕÆÚ¸ñʽ»°·½·¨¶¼ÒѹýÆÚ£¬ËùÒÔ²»ÍƼöʹÓá£
Ò»°ã¸ñʽ»¯Ê±£¬³£Óõ½ÕâÁ½¸öÀࣺCalendar
ºÍSimpleDateFormat
£¬Ê¹Ó÷½·¨ÈçÏ£º
1.CalendarÀà
CalendarÀàÊÇabstractµÄ£¬ËùÒÔʵÀý»¯·½Ê½µÃÓþ²Ì¬·½·¨£º
Calendar c = Calendar.getInstance();£¬
´ËʱµÄÉú³ÉµÄʵÀýÒÀ¾ÝµÄÊǵ±Ç°ÏµÍ³Ê±¼ä£»c.setTime(java.util.Date date)¿ÉÒÔÉ趨Ï붨µÄʱ¼ä¡£
Àý£©
Date date = rs.getDate("hiredate");
Calendar ca = Calendar.getInstance();
ca.setTime(date);
System.out.print(ca.get(Calendar.MONTH) + 1
2.SimpleDateFormatÀà
Date date = rs.getDate("hiredate");
SimpleDateFormat sdf = new SimpleDateFormat();
sdf.applyPattern("yyyy/MM/dd HH:mm:ss");
System.out.println(sdf.format(date));
Ïà¹ØÎĵµ£º
×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......
´«ÖDz¥¿ÍJAVAÅàѵstruts2ѧϰ±Ê¼Ç Ç°Á½ÌìÎÒÏÝÈëÁËstruts2ÔÀíµÄÄàÌ·Öв»¿É×Ô°ÇÁË£¬ÕâÖָоõÏ൱²»´í£¬µ«ÊÇÎÒ¸öÈË»¹ÊǸоõ»ù´¡Èç¹û²»ÊǺܺõĻ°£¬Ç§Íò²»ÒªÏÝÈ룬ÒòΪÕâÑùµÄ»°£¬ºÜÓпÉÄÜÈÃÒ»¸öÈ˱äµÃûÓÐÐÅÐÄ£¬»¹ºÃÎÒÊÇÒ»¸öÐÄÀí»¹´í²»´íµÄÈË£¬ËùÒԺܿì¾Í×ßÁ˳öÀ´¡£ËùÒÔ£¬ÎҵĸöÈ˸оõ»¹ÊÇ£¬ÏÈÕÆÎÕ»ù´¡£¬È»ºóÔÚÈ¥Àí½âÔÀí°É£¬Ò ......
JavaÖеÄstartsWithºÍendsWith·½·¨£¬ÔÚfilterµÄ¹¦ÄÜʵÏÖÖкܷ½±ã£¬PHP¿ÉÒÔÓÃstrncmp()
ʵÏÖstartsWith£¬µ«ÊÇÎÞ·¨ÊµÏÖendsWith£¬ÓÐЩÈË»áÓÃÕýÔòÀ´ÊµÏÖ£¬µ«´ó¶àÊýÈ˶¼²»Ï²»¶ÕýÔò±í´ïʽµÄ²Ù×÷¡£
ÕâÀïÎÒͨ¹ýÒ»¸ö½Ðsubstr_compareµÄ·½·¨ÊµÏÖ(ͬʱËûÒ²ÄÜʵÏÖsta ......
import java.awt.Robot;
import java.io.IOException;
import java.lang.reflect.Field;
public class TestServer {
Class<?> key;
Robot ro;
{//·Ç¾²Ì¬¿éÓÃÓÚ³õʼ»¯ÀàÀàµÄ·Ç¾²Ì¬³ÉÔ±
try {
key = Class.forName("java.awt.event.KeyEvent");
ro = new Robot();
}
catch (Excep ......
// ºÏ²¢ List ÖеÄÏàͬÊý¾ÝÐÐ
// Source £º tmpOrderEntryListBeanList
// Target £º resultOrderEntryListBeanList
// ------------------------------------------------------------------
// £¨1£©½«½á¹û¸³¸ø Result Livon 2010-5-18 Èý
// ÕûÀíÁÐ±í£¬ÒÔ±ã²éѯ¿â´æ¡£
private List<OrderEntryListBe ......