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

JAVA »ñÈ¡±¾ÖܵÄÆðʼÈÕÆÚ troy

import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
/**
 * @author troy(J2EE)
 * @version 1.0
 */
public class Test {
 public static void main(String[] args) throws Exception {
  DateFormat df = DateFormat.getDateInstance();
  Calendar c = Calendar.getInstance();
  c.setTime(df.parse("2010-5-24"));
  int weekDay = c.get(Calendar.DAY_OF_WEEK)==1?8:c.get(Calendar.DAY_OF_WEEK);
  c.add(Calendar.DATE,Calendar.MONDAY - weekDay);
  Date start = c.getTime();
  c.add(Calendar.DATE, 6);
  Date end = c.getTime();
  System.out.print(String.format("%1$tY-%1$tm-%1$td", start) + " "+ String.format("%1$tY-%1$tm-%1$td", end));
 }
}


Ïà¹ØÎĵµ£º

java³ÌÐòÖе÷ÓÃÉãÏñͷʵÏÖjsp³ÌÐòÉãÏñÍ·Êý¾Ý²É¼¯

½üÆÚµÄÒ»¸öÏîÄ¿ÐèҪʵÏÖÉãÏñͷͼÏñ²É¼¯£¬¾­¹ýһϵÁеÄÕÛÌÚÒÔºó£¬ÖÕÓÚʵÏÖÁËÕâ¸ö¹¦ÄÜ£¬ÏÖÕûÀíһϡ£
±¾Éí¾Íjava¼¼ÊõÀ´Ëµ£¬ÒªÊµÏÖÉãÏñÍ·¶þ´Î¿ª·¢£¬²É¼¯ÉãÏñͷͼƬ£¬ÐèҪʹÓõ½JMF£¬JMFÊʺÏʹÓÃÔÚj2se³ÌÐòµ±ÖУ¬ÎÒÐèÒªÔÚweb³ÌÐòÖе÷ÓÃÉãÏñÍ·£¬ºÜÃ÷ÏÔJMFÊǸ㲻¶¨ÁË£¬Ïë¹ýдһ¸öapplet³ÌÐò£¬Ö»ÊÇÄǶ«Î÷ÒªÇó¿Í»§¶Ë±ØÐëÒªÓÐjre»·¾ ......

java.lang.OutOfMemoryError: Java heap space

      ³öÏÖÕâ¸ö´íÎó£¬ËÑË÷µ½1¡¢ÐÞ¸Äeclipse.ini£»2¡¢Ìí¼Ó»·¾³±äÁ¿JAVA_OPTS=-Xms64m -Xmx512m£¬3¡¢ÔÚrun configurations->program argumentsÔö¼ÓXms64m -Xmx512m£¬¾ùÎÞЧ¡£
×îºó½â¾ö°ì·¨£¬ÔÚÓëprogram argumentsһǽ֮¸ôµÄVM argumentsÖÐÌí¼ÓXms64m -Xmx512m¸ã¶¨¡£ ......

android ÖÐjava±à³ÌµÄÒâÍâʼþ´¦Àí

     ²»¹ÜÄãÐŲ»ÐÅ£¬¼´Ê¹¶àôÊìÁ·±à³ÌµÄÈËÔ±ÔÚcodingµÄʱºò¶¼»á³öÏÖÒâÏë²»µ½µÄbug¡£ÔÚÉÏƪÎÄÕÂÖÐÎÒÔøÌáµ½£¬bugµÄÔì³ÉÊǶà¸ö·½ÃæµÄ×ۺϽá¹û£¬ÓÐЩbugÊÇ¿ÉÒÔÐÞ¸´µÄ£¬µ«ÊÇÓÐЩÂß¼­ÉϵÄbugÒªÐÞ¸´¿É²»ÊÇÄÇôÈÝÒ×µÄÊÂÇ飬¾ÍÏñÎÒÃÇ×ö´íÁËÒ»¼þÊÂÇ飬Èç¹û²»È¥´Ó¸ù±¾ÉϸÄÕý¾Í»á·¸¸ü´óµÄ´íÎóÒ»Ñù£¬ÓÐʱºòbugÒ²ÊÇÒ»¸ö»ýÀ ......

JavaÁ½ÖÖÒ쳣ģʽ

JavaÀïÓиöºÜÖØÒªµÄÌØÉ«ÊÇException £¬Ò²¾ÍÊÇ˵ÔÊÐí³ÌÐò²úÉúÀýÍâ×´¿ö¡£¶øÔÚѧJava µÄʱºò£¬ÎÒÃÇÒ²Ö»ÖªµÀException µÄд·¨£¬È´Î´±ØÕæÄÜÁ˽ⲻͬÖÖÀàµÄException µÄÇø±ð¡£
Ê×ÏÈ£¬ÄúÓ¦¸ÃÖªµÀµÄÊÇJava ÌṩÁËÁ½ÖÖException µÄģʽ£¬Ò»ÖÖÊÇÖ´ÐеÄʱºòËù²úÉúµÄException (Runtime Exception)£¬ÁíÍâÒ»ÖÖÔòÊÇÊÜ¿ØÖƵÄException ......

Java Excel API——JXLÈëÃÅ

 
JXL(Java Excel API)ÊÇÒ»¸öÓÃÀ´¶¯Ì¬¶ÁдExcelÎļþµÄ¿ªÔ´¿ò¼Ü£¬ÀûÓÃËü¿ÉÒÔÔÚÈκÎÖ§³ÖJavaµÄ²Ù×÷ϵͳÉ϶¯Ì¬¶ÁдExcelÎļþ¡£JXLµÄÖ÷Ò³ÊÇ£ºhttp://www.andykhan.com/jexcelapi/£¬¿ÉÒÔÔÚÕâÀïÏÂÔص½ËüµÄ×îеİ汾¡£
Äã¿ÉÒÔ·Ö±ðͨ¹ýÈçÏÂÃüÁî
java -jar jxl.jar -xml test.xls
java -jar jxl.jar -cvs test.xls
ÒÔxml ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ