java SystemµÄÊôÐÔ²ÎÊý´óÈ«
Properties props=System.getProperties(); //ϵͳÊôÐÔ
System.out.println("JavaµÄÔËÐл·¾³°æ±¾£º"+props.getProperty("java.version"));
System.out.println("JavaµÄÔËÐл·¾³¹©Ó¦ÉÌ£º"+props.getProperty("java.vendor"));
System.out.println("Java¹©Ó¦É̵ÄURL£º"+props.getProperty("java.vendor.url"));
System.out.println("JavaµÄ°²×°Â·¾¶£º"+props.getProperty("java.home"));
System.out.println("JavaµÄÐéÄâ»ú¹æ·¶°æ±¾£º"+props.getProperty("java.vm.specification.version"));
System.out.println("JavaµÄÐéÄâ»ú¹æ·¶¹©Ó¦ÉÌ£º"+props.getProperty("java.vm.specification.vendor"));
System.out.println("JavaµÄÐéÄâ»ú¹æ·¶Ãû³Æ£º"+props.getProperty("java.vm.specification.name"));
System.out.println("JavaµÄÐéÄâ»úʵÏÖ°æ±¾£º"+props.getProperty("java.vm.version"));
System.out.println("JavaµÄÐéÄâ»úʵÏÖ¹©Ó¦ÉÌ£º"+props.getProperty("java.vm.vendor"));
System.out.println("JavaµÄÐéÄâ»úʵÏÖÃû³Æ£º"+props.getProperty("java.vm.name"));
System.out.println("JavaÔËÐÐʱ»·¾³¹æ·¶°æ±¾£º"+props.getProperty("java.specification.version"));
System.out.println("JavaÔËÐÐʱ»·¾³¹æ·¶¹©Ó¦ÉÌ£º"+props.getProperty("java.specification.vender"));
System.out.println("JavaÔËÐÐʱ»·¾³¹æ·¶Ãû³Æ£º"+props.getProperty("java.specification.name"));
System.out.println("JavaµÄÀà¸ñʽ°æ±¾ºÅ£º"+props.getProperty("java.class.version"));
System.out.println("JavaµÄÀà·¾¶£º"+props.getProperty("java.class.path"));
System.out.println("¼ÓÔØ¿âʱËÑË÷µÄ·¾¶ÁÐ±í£º"+props.getProperty("java.library.path"));
System.out.println("ĬÈϵÄÁÙʱÎļþ·¾¶£º"+props.getProperty("java.io.tmpdir"));
System.o
Ïà¹ØÎĵµ£º
private PreparedStatement pstmt;
String sql="INSERT INTO TABLE(id,Ãû³Æ,Óû§id,Stbid,MAC,Óû§×´Ì¬,×Ü´ÎÊý,IpµØÖ·,×ÊÁϸüÐÂʱ¼ä) " +
"VALUES(?,?,?,?,?,?,?,?,?)";
pstmt=connection.prepareStatement(sql);
pstmt.setString(1,array[0]);
......
Ê×ÏÈÃ÷ȷһϣºjavaÀïÃæÖ»ÓÐÖµ´«µÝ£¬ÒýÓô«µÝÖ»ÊÇÒ»Ö»Îó¶Á¶øÒÑ¡£
À´¿´Ò»¸öÀý×Ó£º
public static void main(String[] args)
{
StringBuffer str1 = new StringBuffer("hello");
test(str1);
System.out.println("main : " + str1);
}
public static void test(StringBuffer s ......
Ò»£º RSS½éÉÜ
¸ù¾Ýά»ù°Ù¿Æ(http://zh.wikipedia.org/wiki/RSS)µÄ¶¨Ò壬“RSSÊÇÒ»ÖÖÓÃÓÚ¹²ÏíÐÂÎźÍÆäËûWebÄÚÈݵÄÊý¾Ý½»»»¹æ·¶ ”£¬ËüÊÇһϵÁеĹ淶µÄ×éºÏ£¬²ÉÓÃXML¸ñʽ¡£Ä¿Ç°¹úÄÚRSSÓ¦ÓÃ×î¶àµÄÊÇÔÚÐÂÎÅÍøÕ¾ºÍ²©¿ÍÍøÕ¾ÉÏ¡£
Ðí¶àÍøÕ¾¿ÉÒÔÓÃRSSÔĶÁÆ÷À´¸öÐÔ»¯×Ô¼ºµÄÍøÒ³£¬±ÈÈçÏÔʾ×îеÄÐÂÀËÐÂÎÅ£¬ÏÔʾ×Ô¼ººÃÅóÓÑ ......
1¡¢ÃæÏò¶ÔÏóµÄÌØÕ÷ÓÐÄÄЩ·½Ãæ
1.³éÏó£º
³éÏó¾ÍÊǺöÂÔÒ»¸öÖ÷ÌâÖÐÓ뵱ǰĿ±êÎ޹صÄÄÇЩ·½Ã棬ÒÔ±ã¸ü³ä·ÖµØ×¢ÒâÓ뵱ǰĿ±êÓйصķ½Ãæ¡£³éÏó²¢²»´òËãÁ˽âÈ«²¿ÎÊÌ⣬¶øÖ»ÊÇÑ¡ÔñÆäÖеÄÒ»²¿·Ö£¬ÔÝʱ²»Óò¿·Öϸ½Ú¡£³éÏó°üÀ¨Á½¸ö·½Ã棬һÊǹý³Ì³éÏ󣬶þÊÇÊý¾Ý³éÏó¡£
2.¼Ì³Ð£º
¼Ì³ÐÊÇÒ»ÖÖÁª½áÀàµÄ²ã´ÎÄ£ÐÍ£ ......
/**
* µÃµ½±¾ÖÜÖÜÒ»
*
* @return yyyy-MM-dd
*/
public static String getMondayOfThisWeek() {
Calendar c = Calendar.getInstance();
int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
if (day_of_week == 0)
da ......