Java¶¨Ê±ÈÎÎñµÄʵÏÖ
¢Ù¼Ì³ÐTimerTask£¬ÖØÐ´run·½·¨
package bamboo.task;
import java.util.TimerTask;
public class TimeTaskTest extends TimerTask{
@Override
public void run() {
System.out.println("hi");
}
}
¢Úͨ¹ýtimerÀ´ÉèÖÃij¸öʱ¼äÀ´µ÷Ó㬻òÕßÊÇÏà¸ô¶à³¤Ê±¼äµ÷ÓÃ
package bamboo.test;
import java.util.Date;
import java.util.Timer;
import bamboo.task.TimeTaskTest;
public class TimeTest {
static TimeTaskTest test=new TimeTaskTest();
public static void main(String [] args){
Timer timer=new Timer();
//Æô¶¯ºÍ¼ä¸ôµÄʱ¼ä 1000ºÁÃë
//timer.schedule(test,0,1000);
//ÉèÖÃʲôʱºòÖ´ÐÐ
//timer.schedule(test, new Date());
}
}
Ïà¹ØÎĵµ£º
ѧϰÁËSSLµÄ»ù±¾ÔÀíºó..¶¯ÊÖÓÃjavaÀ´ÊµÏÖÁËÒ»¸ö°²È«Á¬½ÓµÄʵÀý..
1.ʹÓÃkeytool´´½¨ÃÜÔ¿¶Ô..²¢ÔÚ·þÎñ¶ËºÍ¿Í»§¶ËÍê³É·ÖÅä..¾ßÌå·½·¨¿É²Î¿´:java-ʹÓÃkeytoolÀ´´´½¨¹ÜÀíÃÜÔ¿¼°Ö¤ÊéµÈ-javaѧϰ±Ê¼Ç(3)
2.½¨Á¢¿Í»§¶ËºÍ·þÎñ¶ËµÄsocketʵÀý:
¿Í»§¶Ë´úÂëÈçÏÂ:
public class SSLClient {
public static void startSSLClie ......
1. ´úÀíģʽÖ÷ÒªÓÐÁ½ÖÖ£º¾²Ì¬´úÀíºÍ¶¯Ì¬´úÀí
2. ¾²Ì¬´úÀí£º
±ÈÈçÒªÔÚÊä³ö“HelloWorld”ǰ´òÓ¡Ò»¸ö×Ö·û´®“Welcome”
A:Ïȶ¨ÒåÒ»¸ö½Ó¿ÚÀà
Java´úÂë
package ttitfly.proxy;
public interface HelloWo ......
ǰЩÈÕ×ÓÕÛÌÚµÄÔÚÏßÅÄÕÕ£¬ÓÉÓÚÖ»ÊǸüÐÂblob×ֶΣ¬Ã»ÓÐÔÚ±¾µØ±£´æÕÕÆ¬£¬µ¼Ö¿ͻ§ÅÄÄÔÃÅÏëÒªµÄʱºò²»ÄÜÂíÉÏÄóöÀ´¡£Ã»ËµµÄËÈù˿ÍÊÇÉϵÛÄØ£¬×ö°É¡£Ê¹ÓÃÏ̳߳ش´½¨Èý¸öÏß³ÌÈÃ×Ô¶¨Ò»¸öÏß³ÌÄ¿±ê¹²Ïí£¨Ò²¾ÍÊǰѱíÀïµÄ¼Ç¼·Ö³Én×éͬʱִÐе¼³ö£©¡£³ÌÐòºÜ¼òµ¥£¬Ò»¹²ËĸöÀàºÍÒ»¸öojdbc14.jar°ü¡£ÓÉÓÚsqlÓï¾äд´íÁËÔì³É¶à¸öÏ̶߳ÔÒ»¸ ......
µ±ÄãÔÚÄã×Ô¼ºµÄµçÄÔÉÏ×°µÄ¶«Î÷±È½Ï¶àµÄʱºò£¬¶øÇÒÖ´ÐгÌÐòÓкÜÂÒ£¬ÈÃÄãÒ²ºÜ²»ºÃÕÒ£¬ÏÂÃæÕâ¸öÊÇÎÒÓÃjavaдµÄÒ»¶ÎС³ÌÐò£¬Ö±½ÓÔÚÄãµÄÔËÐд°¿ÚÊäÈë java open ??¾Í¿ÉÒÔ´ò¿ªÄã×Ô¼ºµÄÏëÒªµÄ»·¾³»òÕß¹¤¾ßÁË
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class open {
publi ......
BODY { color: #000000; font-size: 9pt; font-family: ËÎÌå }
TABLE { font-size: 9pt; font-family: ËÎÌå }
SimpleDateFormat sdfy = new SimpleDateFormat("HH:mm");
String tt =
"Tue Feb 09 10:43:00 CST 2010";
&n ......