Java ʱ¼ä·¶Î§ Util
import java.util.Date;
public class TimeSpan
{
public final static TimeSpan ZERO = new TimeSpan(0);
private long _totalMilliSeconds = 0;
public TimeSpan(long totalMilliSeconds)
{
_totalMilliSeconds = totalMilliSeconds;
}
public TimeSpan(Date afterDate, Date beforeDate)
{
this(afterDate.getTime() - beforeDate.getTime());
}
public long getMilliSeconds()
{
return _totalMilliSeconds;
}
public long getSeconds()
{
return Math.round(_totalMilliSeconds/1000);
}
public long getMinutes()
{
return Math.round(_totalMilliSeconds/(1000*60));
}
public long getHours()
{
return Math.round(_totalMilliSeconds/(1000*60*60));
}
}
Ïà¹ØÎĵµ£º
// ´´½¨Excel
String destFileName = tableName + ".xls";//ÎļþÃû
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=".concat(String .valueOf(destFileNa ......
Java ¶¨ÒåµÄλÔËË㣨bitwise operators £©Ö±½Ó¶ÔÕûÊýÀàÐ͵Äλ½øÐвÙ×÷£¬ÕâЩÕûÊýÀàÐͰüÀ¨long£¬int£¬short£¬char£¬and byte ¡£±í4-2 ÁгöÁËλÔËË㣺
±í4.2 λÔËËã·û¼°Æä½á¹û
ÔËËã·û &nb ......
JAVAÐéÄâ»úÓÐÒ»¸ö×Ö·û´®³Ø,¶ÔÓÚ×Ö·û´®³ØµÄ·ÃÎÊ¿ÉÒÔʹÓÃ×Ö·û´®¶ÔÏóµÄintern()·½·¨,¿É¶¯Ì¬Ïò³ØÖÐÌí¼Ó¶ÔÏó,ËüµÄ¶¨ÒåÈçÏÂ:
public native String intern();
ÕâÊÇÒ»¸ö±¾µØ·½·¨,ÔÚµ÷ÓÃÕâ¸ö·½·¨Ê±,JAVAÐéÄâ»úÊ×Ïȼì²é×Ö·û´®³ØÖÐÊÇ·ñ´æÔÚÓë¸Ã×Ö·û´®¶ÔÏóÖµÏàµÈµÄ¶ÔÏó,Èç¹û´æÔھͷµ»Ø×Ö·û´®³ØÖеĶÔÏóµÄÒýÓÃ,·ñÔò¾Íд´½¨Ò»¸ö ......
¸´ÖÆÊý×éµÄ·½·¨£º
ÔÚJAVAÀïÃæ£¬¿ÉÒÔÓø´ÖÆÓï¾ä“A=B”¸ø»ù±¾ÀàÐ͵ÄÊý¾Ý´«µÝÖµ£¬µ«ÊÇÈç¹ûA,BÊÇÁ½¸öͬÀàÐ͵ÄÊý×飬¸´ÖƾÍÏ൱ÓÚ½«Ò»¸öÊý×é±äÁ¿µÄÒýÓô«µÝ¸øÁíÒ»¸öÊý×飻Èç¹ûÒ»¸öÊý×é·¢Éú¸Ä±ä£¬ÄÇôÒýÓÃͬһÊý×éµÄ±äÁ¿Ò²Òª·¢Éú¸Ä±ä¡£
ÒÔÏÂÊǹéÄɵÄJAVAÖи´ÖÆÊý×éÔªËØÖµµÄµÄ·½·¨£º£¨É±´£©
1¡£Ê¹ÓÃFORÑ»· ......
2009-04-14 16:39
½üˮ¥̨ÏȵÃÔ£¬ÏòÑô»¨Ä¾Ò×Ϊ´º--------ËÕ÷ë
»º´æµÄ×÷ÓÃÔÚµÚÒ»ÂÛhttp://hi.baidu.com/%CB%BC%C3%F4%D3%EA/blog/item/908d0cdecbc8a71b495403cc.htmlÖÐÒÑÓв¿·Ö²ûÊö,ÏÂÃæahuaxuanºÍ´ó¼ÒÒ»ÆðÀ´Ñ§Ï°Ò»Ï»º´æµÃÁíÍâÒ»¸öÖØÒªµÄ¹æÔò,½üºÍ¿ì.
ÔÚÎÒÃÇ´ò¿ªä¯ÀÀÆ÷,¾ö¶¨ä¯ÀÀij¸öÍøÒ³Ö®Ç°(Ö¸ÈËÑÛ¿´µ½ÆÁÄ»ÉϵÄÄÚÈ ......