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

javaÈÕÆÚ´¦Àí - Java / Java SE

µ±ÖªµÀÒ»¸öÈÕÆÚ£¬ÈçºÎ°ÑÕâ¸öÈÕÆÚËùÔÚÑ®µÄÇ°ºóÁ½¸öÈÕÆÚÈ¡³ö
±ÈÈçÊäÈë20090905£¬¾ÍÊäÈë20090901 20090910
Êä³ö20090901 20090910

È¡µÃÌìÊýºó×÷Ò»ÏÂÅжÏÔÙ°ÑÕâ¸ö·½·¨ÓÃÏÂvoid set(int field, int value)  

Ó¦¸Ã¾Í¿ÉÒÔÁË¡£

·ÖÉÙÁË°É

Ñ®?
ÏȽØÈ¡³öÄêÔÂÈÕ (d="20090905")
year=Integer.valueOf(d.substring(0,4));
month=Integer.valueOf(d.substring(4,6));
day=Integer.valueOf(d.substring(6,8));

ÔÙÓÃdayÈ¥ÅжÏÔÚÄĸöÑ®ÄÚ ÓÃ×Ö·û´®µÄappend()·½·¨×·¼Ó¾Í¿ÉÒÔÁË°É ¶ÔÓÚÂ¥Ö÷ÕâÑùµÄÐèÇó


public String getTime(String s){
java.util.Date d=null;
try {
d=(java.util.Date)new SimpleDateFormat("yyyyMMdd").parse(s);
} catch (ParseException e) {
e.printStackTrace();
}
String s1=new java.sql.Date(d.getTime()-5*86400000).toString().replaceAll("-", "");//Ç°5Ìì
String s2=new java.sql.Date(d.getTime()+5*86400000).toString().replaceAll("-", "");//ºó5Ìì
System.out.println(s1+" "+s2);
return s1+" "+s2;
}

дÍê²Å·¢ÏÖ£¬Ã²ËƲ»ÊÇÂ¥Ö÷ÒªµÄ£¬²»ºÃÒâ˼¡£

ÕâÑù¾Í¿ÉÒÔÁËô¡£

public static void getTime() {
String str = "20090225";
StringBuilder sb = new StringBuilder();
Date date = null;
try {
date = dateformat.parse(str);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.p[code=Java][/c


Ïà¹ØÎÊ´ð£º

javaÈçºÎ¿ØÖÆÔ¶³ÌLinuxÖØÆô

ÎÒÄ¿Ç°ÔÚ±¾µØµÄlinuxÉÏдÁËÒ»¸öswingµÄ½çÃ棬Ïëͨ¹ýÕâ¸ö½çÃæÀ´¿ØÖÆÆäËüµçÄÔµÄlinuxÖØÆô¡£
ÎÒÖªµÀÓÃRuntime.getRuntime().exec("shutdown -r");¿ÉÒÔ¿ØÖƱ¾»úLinuxÖØÆô£¬µ«ÊÇÔõô¿ØÖÆÔ¶³ÌµÄlinuxÖØÆôÄØ£¿ ......

javaµÄÎÊÌâ ¼±¼±£¡!

ÎÒÔÚeclipseÖÐдÁËÒ»¸ö²¥·ÅÒôÀÖµÄÀ࣬²¢°ÑÒôÀÖÎļþºÍÀàÎļþ·ÅÔÚÁËÒ»Æ𣬽á¹ûÔËÐÐʱ£¬³öÏÖ´íÎó£¬ËµÊÇÒôÀÖÎļþÄǸöÊǿյģ¬µ«ÊÇÔÚjcreatorÓÃͬÑùµÄ·½·¨½á¹ûÊÇ¿ÉÒÔÔËÐеģ¬ÇëÇó¸ß˵ָ½Ì£¬¸æËßΪʲô£¿¼±
ÄãÈôÊÇÔÚWindo ......

ÕÐƸJava web¿ª·¢ÈËÔ±

²àÖØÓÚ»¥ÁªÍø¿ª·¢

JAVA¿ª·¢¹¤³Ìʦ
ְλÃèÊö£º
1¡¢°´USECASE½øÐÐÒµÎñÐèÇó·ÖÎöºÍÈí¼þ¸ÅÒªÉè¼Æ£»
2¡¢½øÐÐÈí¼þÏêϸÉè¼ÆºÍ±àÂëʵÏÖ£¬È·±£ÐÔÄÜ¡¢ÖÊÁ¿ºÍ°²È«£»
3¡¢Î¬»¤ºÍÉý¼¶ÏÖÓÐÈí¼þ²úÆ·£¬¿ìËÙ¶¨Î»² ......

javaÓï·¨ÎÊÌâ - Java / Java EE

import java.io.*;
class FileTest
{
public static void main(String [] args) throws Exception
{

File fDir=new File(File.separator);
String strFile="javaÔ´´úÂë²âÊÔ"+File.separato ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ