javaÖÐ×Ö·û´®×ª»»³Éʱ¼ä¸ñʽ×ܽá
javaÖÐ×Ö·û´®×ª»»³Éʱ¼ä¸ñʽ×ܽá
¹Ø¼ü×Ö: java ×Ö·û´® ʱ¼ä ¸ñʽ
ͨ¹ý³¤Ê±¼äµÄ¶Ôʱ¼ä²»Í¬¸ñʽµÄת»»£¬×Ô¼º¾õµÃÆäʵ¾ÍÊǶԺÁÃëÊýµÄ²Ù×÷
Java´úÂë
System.currentTimeMillis()
System.currentTimeMillis()
µÃµ½´Ó1970Äê1ÔÂ1ÈÕµ½ÏÖÔڵĺÁÃëÊý£¬¾Í¿ÉÒÔת»»³É¸÷ÖÖµÄÐÎʽ¡£
ÓÐÕâÑùÒ»¸ö×Ö·û´®£º“20070911121547”£¬
ת»»³Éʱ¼ä¸ñʽ£º2007-09-11 12:15:47
Java´úÂë
public class bb {
public static void main(String[] args) {
// TODO Auto-generated method stub
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
String dateString = "20071128175545";
try {
Date date = df.parse(dateString);
System.out.println(df.format(date));
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
}
public class bb {
public static void main(String[] args) {
// TODO Auto-generated method stub
SimpleDateFormat df = new SimpleDateFormat("yyyyMMddhhmmss");
String dateString = "20071128175545";
try {
Date date = df.parse(dateString);
System.out.println(df.format(date));
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
}
Ê
Ïà¹ØÎĵµ£º
½ñÌìÎÒÔÚ×ö·É»ú¡£ÎªÊ²Ã´ËµÎÒÔÚ×ö·É»úÄØ£¡ÒòΪÕâÊÇÎÒ½ø´«ÖDz¥¿ÍÒÔÀ´£¬¸öÈ˸оõ·Ç³£ÖØÒªµÄÒ»ÌÿΣ¬µ«ÊÇÎÒ²»ÄÜÒ»ÏÂ×Ó¼ÇסËùËùÓеĶ«Î÷£¬×òÌìÍíÉÏ£¬¿´ÊÓƵ¿´µ½ÍíÉÏÈýµã£¬½ñÌìÉϿκÜÏ뼯ÖÐ×¢ÒâÁ¦£¬µ«ÊÇ×îÖÕ»¹ÊÇÈ̲»×¡´òÁËî§Ë¯£¬µ«½ñÌìµÄµÄ¿Î¸øÎҵĸоõÊǷdz£¾ßÓÐÁ¬¹áÐÔ£¬Ç°ÃæµÄ¿ÎÈç¹ûÌýµÃ²»ÊǺÜÇ ......
package com.flxx.docUrl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.List;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jd ......
Ìù¶Î´úÂë,ÓÐÉÙÐí×¢ÊÍ:
package ibees;
import java.util.Arrays;
public class BinarySearch {
/**
* @param args
*/
public static void main(String[] args) {
double[] src = new double[]{1.3,9.9,10.89,12.89,89.0};
System.out.println(new BinarySearch().binarySearch(src, 89.0));
}
......
public class Test {
public static void main(String args[]) {
System.out.println(Integer.toBinaryString(20)); //Ê®½øÖÆ-->2½øÖÆ
System ......
³ÌÐòÉè¼ÆÊǽâ¾öÎÊÌâ˼·µÄ¾ßÌ廯.¾ÍÏñ½¨ÔìÒ»×ù·¿×ÓÒ»Ñù£¬ÓÃʲôÑùµÄ²ÄÁÏ,½¨Ôìʲô·ç¸ñµÄ½¨Öþ,¾ßÌåÿ¸öλÖÃÊÇʲô... ²»Í¬µÄ½¨Öþʦ»áÓв»Í¬µÄ·½·¨. ¶ø°ÑÍê³ÉijһÌض¨ÎÊÌâµÄ½â¾ö˼·¹æ·¶Ò»Ï ¾Í¿ÉÒÔ³Æ×÷ΪһÖÖÉè¼Æģʽ.
³ÌÐòÉè¼ÆÖÐÉè¼ÆģʽΪÎÒÃÇÔÚijһÎÊÌâÓòÌṩÁËÒ»ÖÖÁ¼ºÃµÄʵÏÖ·½·¨²Î¿¼£¬¿ÉÒÔ´ó´óʵÏÖ¸´Óú͸ßЧ¡£
ÏÂÃæÎ ......