JAVA ÈÕÆÚÏà¹Ø£¨×ªÔØ£©
/**
* ÓйØÈÕÆÚ¹¤¾ßÀà(extends TimeUtil)
*
* TimeUtilÖ÷Òª¹¦ÄÜÓУº
* 1.¸÷ÖÖÈÕÆÚÀàÐÍ£¨×Ö·û£¬util.Date£¬sql.Date£¬CalendarµÈ£©×ª»»
* 2.»ñÈ¡Ö¸¶¨ÈÕÆÚµÄÄê·Ý£¬Ô·ݣ¬ÈÕ·Ý£¬Ð¡Ê±£¬·Ö£¬Ã룬ºÁÃë
* 3.»ñÈ¡µ±Ç°/ϵͳÈÕÆÚ(Ö¸¶¨ÈÕÆÚ¸ñʽ)
* 4.»ñÈ¡×Ö·ûÈÕÆÚÒ»¸öÔµÄÌìÊý
* 5.»ñÈ¡Ö¸¶¨Ô·ݵĵÚÒ»Ìì,×îºóÒ»Ìì
*
* DateUtilÖ÷Òª¹¦ÄÜÓУº
* 1.ÈÕÆڱȽÏ
* 2.»ñÈ¡2¸ö×Ö·ûÈÕÆÚµÄÌìÊý²î£¬ÖÜÊý²î£¬ÔÂÊý²î£¬ÄêÊý²î
* 3.ÈÕÆÚÌí¼Ó
* 4.Åжϸø¶¨ÈÕÆÚÊDz»ÊÇÈóÄê
*/package com.aimtime.financing.service.util;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.text.*;public abstract class TimeUtil {
//---µ±Ç°ÈÕÆÚµÄÄ꣬Ô£¬ÈÕ£¬Ê±£¬·Ö£¬Ãë
public static Calendar now = Calendar.getInstance();
int year = now.get( Calendar.YEAR );
int date = now.get( Calendar.DAY_OF_MONTH );
int month = now.get( Calendar.MONTH ) + 1;
int hour = now.get( Calendar.HOUR );
int min = now.get( Calendar.MINUTE );
int sec = now.get( Calendar.SECOND );
//-------------------------------ÈÕÆÚÀàÐÍת»»---------------------------------------------------------------------------
/**
* ×Ö·ûÐÍÈÕÆÚת»¯util.DateÐÍÈÕÆÚ
* @Param:p_strDate ×Ö·ûÐÍÈÕÆÚ
* @param p_format ¸ñʽ:"yyyy-MM-dd" / "yyyy-MM-dd hh:mm:ss"
* @Return:java.util.Date util.DateÐÍÈÕÆÚ
* @Throws: ParseException
* @Author: zhuqx
* @Date: 2006-10-31
*/
public static java.util.Date toUtilDatefromStrDateByFormat( String p_strDate, String p_format )
throws ParseException {
java.util.Date l_date = null;
java.text.DateFormat df = new java.text.SimpleDateFormat( p_format );
if ( p_strDate != null && ( !"".equals( p_strDate ) ) && p_format != null && ( !"".equals( p_format ) ) ) {
l_date = df.parse( p_strDate );
}
return l_date;
}
/**
* ×Ö·û
Ïà¹ØÎĵµ£º
ÔÚjava.math°üÖÐÓиöBigDecimalÀ࣬ͨ¹ýÕâ¸öÀà¿ÉÒÔ½øÐо«È·¼ÆËã. ÎÒÃÇÖªµÀBigDecimalÓиösetScale(int ¾«¶È,int ÉáÈëģʽ)·½·¨£¬ËæÖ®¶øÀ´ÎÊÌâ³öÏÖÁË£¬µ±ÔËÐÐÈçÏ´úÂëʱ£º
/**
* @author troy(J2EE)
* @version 1.0
*/
import java.math.*;
public class Test{
& ......
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;
/**
ÎļþÃû£ºFileEncrypter.java
JDK£º1.40ÒÔÉÏ
˵Ã÷£ºÎļþ¼ÓÃÜ
¼ÓÃÜ·½·¨£ºÈýÖØDES¼ÓÃÜ
¼ÓÃܹý³Ì£º¶ÔÑ¡ÖеÄÎļþ¼ÓÃܺóÔÚͬÎļ ......
MySqlµÄʱ¼äÀàÐÍÓÐ JavaÖÐÓëÖ®¶ÔÓ¦µÄʱ¼äÀàÐÍ
date ......
Ò»¡¢Ïß³Ì
1 Ï̵߳Ĵ´½¨
´´½¨Ïß³Ìͨ³£ÓÐÁ½ÖÖ·½·¨: 1) À©Õ¹ThreadÀàʵÏÖÏ̵߳Ĵ´½¨ÊÇ×î³£ÓÃÒ²ÊÇ×îÖ±½ÓµÄÒ»ÖÖ·½·¨£¬Í¨¹ý¼Ì³ÐÀàThreadʵÏÖÏß³ÌÌ壻2) ͨ¹ýʵÏÖRunnable½Ó¿ÚʵÏÖÏß³ÌÌå¡£
2 ThreadÀàµÄ¼¸ÖÖ¹¹Ô캯Êý
1) Thread()
2) Thread(Runnable target)
3) T ......
Ò»¸öÓÅÐãµÄJava³ÌÐòÔ±±ØÐëÁ˽âGCµÄ¹¤×÷ÔÀí¡¢ÈçºÎÓÅ»¯GCµÄÐÔÄÜ¡¢ÈçºÎÓëGC½øÐÐÓÐÏ޵Ľ»»¥£¬ÒòΪÓÐһЩӦÓóÌÐò¶ÔÐÔÄÜÒªÇó½Ï¸ß£¬ÀýÈçǶÈëʽϵͳ¡¢ÊµÊ±ÏµÍ³µÈ£¬Ö»ÓÐÈ«ÃæÌáÉýÄÚ´æµÄ¹ÜÀíЧÂÊ £¬²ÅÄÜÌá¸ßÕû¸öÓ¦ÓóÌÐòµÄÐÔÄÜ¡£±¾ÆªÎÄÕÂÊ×Ïȼòµ¥½éÉÜGCµÄ¹¤×÷ÔÀíÖ®ºó£¬È»ºóÔÙ¶ÔGCµÄ¼¸¸ö¹Ø¼üÎÊÌâ½øÐÐÉîÈë̽ÌÖ£¬×îºóÌá³öһЩJava³ÌÐòÉ ......