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

java ÈÕÆÚ¼ÆËã(¼¸ÌìÇ°ºó)

public class DateTest {
 public static void main(String[] args) {
  Date date = new Date(); // н¨Ò»¸öÈÕÆÚ
  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); // ¸ñʽ»¯ÈÕÆÚ
  String beforeDate = sdf.format(getDateBefore(date, 10));
  System.out.println(beforeDate);
  String afterDate = sdf.format(getDateAfter(date, 10));
  System.out.println(afterDate);
 }
 /**
  * µÃµ½¼¸ÌìÇ°µÄʱ¼ä
  */
 public static Date getDateBefore(Date d, int day) {
  Calendar now = Calendar.getInstance();
  now.setTime(d);
  now.set(Calendar.DATE, now.get(Calendar.DATE) - day);
  return now.getTime();
 }
 /**
  * µÃµ½¼¸ÌìºóµÄʱ¼ä
  */
 
 public static Date getDateAfter(Date d, int day) {
  Calendar now = Calendar.getInstance();
  now.setTime(d);
  now.set(Calendar.DATE, now.get(Calendar.DATE) + day);
  return now.getTime();
 }
}


Ïà¹ØÎĵµ£º

JavaÕ»Óë¶Ñ

1. Õ»(stack)Óë¶Ñ(heap)¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
2. Õ»µÄÓÅÊÆÊÇ£¬´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓÚÖ±½ÓλÓÚCPUÖеļĴæÆ÷¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐëÊÇÈ·¶¨µÄ£¬È±·¦Áé»îÐÔ¡£ÁíÍ⣬ջÊý¾Ý¿ÉÒÔ¹²Ïí£¬Ïê¼ûµÚ3µã¡£¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅä ......

javaÓ¦ÓÃtomcatʵÏÖhttps ssl°²È«Á¬½ÓµÄ·½·¨

ÔÚÕ⿪ʼ֮ǰ£¬ÎÒÃǵÃÏÈÁ˽âÒ»ÏÂʲôÊÇhttps¡£
https (Secure Hypertext Transfer Protocol) = °²È«³¬Îı¾´«ÊäЭÒé
httpsµÄÌصãÊÇ£º
1.Êý¾Ý¼ÓÃÜ£¨SSL£© = Secure Socket Layer
2.Éí·ÝÈÏÖ¤
µ±ÄãµÄÏîÄ¿ÐèÒª¿¼ÂÇ°²È«ÐÔµÄʱºò£¬²¿·ÖÄ£¿é¿ÉÒÔÓõ½https¡£µ±È»ÕâЩ¶¼µÃµ½CA×¢²á£¬ÒªÇ®Ç®µÄŶ¡£
ÕâÀïÎÒÏë¸ø´ó¼Ò½éÉܸö²»ÊÕ·ÑµÄ ......

Ö÷Ì⣺ʵսjava Concurrent

±àд¶àÏ̵߳ijÌÐòÒ»Ö±¶¼ÊÇÒ»¼þ±È½ÏÂé·³µÄÊÂÇ飬Ҫ¿¼ÂǺܶàÊÂÇ飬´¦Àí²»ºÃ»¹»á³öºÜ¶àÒâÏë²»µ½µÄÂé·³¡£¼ÓÉÏÏÖÔںܶ࿪·¢Õß½Ó´¥µ½µÄÏîÄ¿¶¼ÊÇ´ò×ÅÆóÒµ¼¶ÆìºÅµÄB/SÏîÄ¿£¬´ó¶àÊýÈ˶¼ºÜÉÙÉæ¼°¶àỊ̈߳¬ÕâÓÖΪ±¾ÎĵÄÖ÷½ÇÔö¼ÓÁËÒ»·ÝÉñÃظС£
½²µ½Java¶àỊ̈߳¬´ó¶àÊýÈËÄÔº£ÖÐÌø³öÀ´µÄÊÇThread¡¢Runnable¡¢synchronized…&hellip ......

Java,JavaScript,JScript Çø±ð

ÕâÈý¸öÓïÑÔ·Ö±ðÊÇÈý¸ö¹«Ë¾¿ª·¢µÄ£¬SUNµÄJava£¬NetscapeµÄJavaScript£¬MicrosoftµÄJScript
JavaScriptÊÇÓÉNetscape¹«Ë¾¿ª·¢²¢ËæNavigatorµ¼º½ÕßÒ»Æð·¢²¼µÄ¡¢½éÓÚJavaÓëHTMLÖ®¼ä¡¢»ùÓÚ¶ÔÏóʼþÇý¶¯µÄ±à³ÌÓïÑÔ£¬²»ÐèÒªJava±àÒëÆ÷£¬¶øÊÇÖ±½ÓÔËÐÐÔÚWebä¯ÀÀÆ÷ÖУ¬ËüµÄÇ°ÉíÊÇLive Script¡£
JScriptÊÇÒ»ÖÖÀàËÆJavaScriptµÄÓïÑÔ¡ ......

JavaÖÐequalºÍ==µÄ±È½Ï[zz]

×î½ü¿´µ½Ò»¸öÍøÓѹØÓÚ==ºÍequals ×öµÄ×ܽᣬ·ÖÏíÒ»ÏÂ
javaÖÐequals·½·¨ºÍ“==”µÄÇø±ð£º
equals ·½·¨ÊÇ java.lang.Object ÀàµÄ·½·¨¡£
ÓÐÁ½ÖÖÓ÷¨ËµÃ÷£º
£¨1£©¶ÔÓÚ×Ö·û´®±äÁ¿À´Ëµ£¬Ê¹ÓÓ==”ºÍ“equals()”·½·¨±È½Ï×Ö·û´®Ê±£¬Æä±È½Ï·½·¨²»Í¬¡£
“==”±È½ÏÁ½¸ö±äÁ¿±¾ÉíµÄÖµ£¬¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ