Java ¶àÏß³Ì
1. ´´½¨Ị̈߳¨¼Ì³ÐThreadºÍʵÏÖrunnable½Ó¿Ú£© class SubThread {
private class InnerThread extends Thread {
@Override
public void run() {
System.out.println(Thread.currentThread().getName());
super.run();
}
}
public Thread getThread() {
return new InnerThread();
}
}
£². Ï̵߳ĿØÖÆ
isAlive() //ÅжÏÏß³ÌÊÇ·ñ»¹¡°»î×Å¡±£¬¼´Ïß³ÌÊÇ·ñ»¹Î´ÖÕÖ¹
getPriority() //»ñµÃÏ̵߳ÄÓÅÏȼ¶ÊýÖµ
setPriority() //ÉèÖÃÏ̵߳ÄÓÅÏȼ¶Ö¸Êý
Thread.sleep() //¾²Ì¬·½·¨£¬½«µ±Ç°Ïß³Ì˯ÃßÖ¸¶¨ºÁÃëÊý
join() //µ÷ÓÃijÏ̵߳ĸ÷½·¨£¬½«µ±Ç°Ïß³ÌÓë¸ÃÏ̺߳ϲ¢£¬
//¼´µÈ´ý¸ÃÏ߳̽áÊø£¬Ôٻظ´µ±Ç°Ï̵߳ÄÔËÐС£
yield() //ÈóöCPU£¬µ±Ç°Ï߳̽øÈë¾ÍÐ÷״̬µÈ´ýµ÷¶È
interrupt() //ÖжÏÏß³Ì
wait() //µ±Ç°Ï߳̽øÈë¶ÔÏóµÄwait pool
notify()/all //»½ÐѶÔÏóµÄwait poolÖеÄÒ»¸ö/ËùÓеȴýÏß³Ì
3. Ï̵߳Äͬ²½£¨Í¬²½¿éºÍͬ²½·½·¨£©synchronized
Ïà¹ØÎĵµ£º
×÷Õߣºrobbin
꿅᣼http://www.fankai.com/
Java Learning Path £¨Ò»£©¡¢¹¤¾ßƪ
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕ ......
String Agent = request.getHeader("User-Agent");
StringTokenizer st = new StringTokenizer(Agent,";");
st.nextToken();
//µÃµ½Óû§µÄä¯ÀÀÆ÷Ãû
String userbrowser = st.nextToken();
//µÃµ½Óû§µÄ²Ù×÷ϵͳÃû
String useros = st.nextToken();
È¡µÃ±¾»úµÄÐÅÏ¢Ò²¿ÉÒÔÕâÑù£º
²Ù×÷ϵͳÐÅÏ¢
System.getProperty("o ......
ÊäÈëÍøÒ³ÎļþÃû£¬ºÍ×ÊÔ´ÁбíÎļþÃû
Êä³ö×ÊÔ´ÁбíÎļþ¹©Ñ¸À×ÏÂÔØ¡£
ÊÊÓÃÓÚÅúÁ¿ÏÂÔØÍ¼Æ¬¡£
ÓÉÁ½¸öÎļþ×é³É¡£
ûÓÐÌá¹©ÍøÒ³ÏÂÔØ¹¦ÄÜ£¬ÒòΪÎÒûÓÐʱ¼äд£¬Ïà¹ØµÄ´úÂëÒÔºóÔÙÌù¡£
1
//
AnalizeIMG.java
2
3
//
Ö÷³ÌÐò
4
5
import
java.io.BufferedReader;
6
import
......
ÔÚjavaÖÐ ¿ÉÒÔ½«Ä³¸ö¶ÔÏó¸³Öµ¸øÁíÒ»¸ö¶ÔÏó Ö»Òª¸ÃÁ½¸ö¶ÔÏóÊÇÊôÓÚͬһ¸öÀ༴¿É ´Ëʱ ÕâÁ½¸ö¶ÔÏóµÄËùÓгÉÔ±½«Ö¸Ïòͬһ¿éÄÚ´æ
eg£º
public class class1
{
&n ......