JAVAÏß³ÌÖ®Èý£ºÏ̵߳ĹÒÆðºÍ»Ö¸´
1£¬¸ÅÊö£ºÏ̵߳ĹÒÆð²Ù×÷ʵÖÊÉϾÍÊÇʹÏ߳̽øÈë“·Ç¿ÉÖ´ÐД״̬Ï£¬ÔÚÕâ¸ö״̬ÏÂCPU²»»á·Ö¸øÏß³Ìʱ¼äƬ£¬½øÈëÕâ¸ö״̬¿ÉÒÔÓÃÀ´ÔÝÍ£Ò»¸öÏ̵߳ÄÔËÐУ»ÔÚÏ̹߳ÒÆðºó£¬¿ÉÒÔͨ¹ýÖØл½ÐÑÏß³ÌÀ´Ê¹Ö®»Ö¸´ÔËÐС£µ±Ò»¸öÏ߳̽øÈë“·Ç¿ÉÖ´ÐД״̬£¬¼´¹ÒÆð״̬ʱ£¬±ØÈ»´æÔÚijÖÖÔÒòʹÆä²»ÄܼÌÐøÔËÐУ¬ÕâЩÔÒò¿ÉÄÜÊÇÈçϼ¸ÖÖÇé¿ö£º
£¨1£©Í¨¹ýµ÷ÓÃsleep()·½·¨Ê¹Ï߳̽øÈëÐÝÃß״̬£¬Ïß³ÌÔÚÖ¸¶¨Ê±¼äÄÚ²»»áÔËÐС£
£¨2£©Í¨¹ýµ÷ÓÃjoin()·½·¨Ê¹Ï̹߳ÒÆð£¬Èç¹ûij¸öÏß³ÌÔÚÁíÒ»¸öÏß³ÌtÉϵ÷ÓÃt.join()£¬Õâ¸öÏ߳̽«±»¹ÒÆð£¬Ö±µ½Ïß³ÌtÖ´ÐÐÍê±ÏΪֹ¡£
£¨3£©Í¨¹ýµ÷ÓÃwait()·½·¨Ê¹Ï̹߳ÒÆð£¬Ö±µ½Ï̵߳õ½ÁËnotify()ºÍnotifyAll()ÏûÏ¢£¬Ï̲߳Żá½øÈë“¿ÉÖ´ÐД״̬¡£
2£¬sleep()·½·¨£ºÊÇÒ»¸öʹÏß³ÌÔÝʱֹͣһ¶ÎÖ´ÐÐʱ¼äµÄ·½·¨£¬¸Ãʱ¼äÓɸø¶¨µÄºÁÃëÊý¾ö¶¨¡£ÏÂÃæÑÝʾһ¸öʹÓÃsleep()·½·¨µÄÀý×Ó£¬ÈçÏ¡£
public void run()
{
int count=3;
while(true)
{
System.out.println(this); //´òÓ¡¶ÔÏó
try
{
sleep(1000); //ÐÝÃß1000ms
}catch(Exception e)
{
e.printStackTrace();
}
&n
Ïà¹ØÎĵµ£º
ÎÒ´òËãÓýñÄêÒ»ÄêµÄʱ¼ä°Ñ´«ÖDz©¿ÍµÄjava¿Î³ÌѧÍê²»Öª¿É²»¿ÉÐУ¿ÔÚѧÁËËûÔÚÍøÉϵĿγÌÖ®ºó¶Ô×Ô¼ºµÄÏîĿʵսÊÇ·ñÓаïÖú£¿ËäÈ»»¹²»È·¶¨£¬µ«¾¡Á¦°É¡£·´Õý½ñÄêµÄʱ¼äÒ²²»¶à£¬»¹µÃÔÚÿÌìµÄÍíÉÏÏ°àʱ¼ä½øÐУ¬ºÜÐÁ¿àµÄ¡£Íâ¼ÓÉÏ×Ô¼ºÑÛ¸ßÊֵͣ¬Ö´Ðв»Á¦£¬Ð§¹ûºÜ¿ÉÄÜ´ó´óÕÛ¿Û¡£¾¡Á¦°É ......
ÕâÁ½ÌìѧУ¿ªÊ¼ÈÃÎÒÃÇÕâÒ»´óÅú¸ß·ÑÉúÑ¡Ôñ×Ô¼ºµÄרҵ·½Ïò£¬Focuser
ÎÒ
¾¹ýºÃ¼¸¸öÄêÍ·µÄ˼¿¼£¬²¢ÇÒÔÚÎÒÃÇÇ×°®c#ÀÏʦÈÈÇéµÄÏò
ÎÒÃǽéÉÜ.netµÄÇ°¾°ºó£¬ÒãÈ»¼á¶¨µÄÑ¡ÔñÁËjavaÕâÌõ×Ô¼ºÈÏΪǰ³ÌËƽõµÄµÀ·¡£ÒÔϵÄÕâЩÍøÕ¾ÊÇÎÒƽʱ¾³£·ÃÎʵÄһЩ¹úÍâµÄÓ¢ÎÄjavaÍøÕ¾£¬½ñÌìÌØ
µØµÄ·¢²¼¸ø´ó¼Ò£¬Ï£ÍûÎÒÃÇÄܹ»ÕæÕýµÄѧϰµ½jav ......
ÎļþÃû£ºSjis.java
class Sj
{
public static void main(String[] args)
{
}
}
-------------------------------------
Ö´ÐУº
javac Sjis.java
Java Sj
¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢¡¢
ÎļþÃû£ºSjis.java
public class Sjis.java
{
public static ......
ÎÄÕÂת×Ô£ºhttp://javastudy.blog.51cto.com/183528/78723
jsp¿ª·¢ÖÐµÄ ¼àÌýÆ÷ºÍ¹ýÂËÆ÷£¬ÕâÁ½¸ö¶«Î÷Ҫ˵ÆðÀ´£¬ºÜ´ó£¬ºÜ·±¡£½ñÌìÎÒÏëÓÃÒ»¸öÏÖʵµÄÀý×Ó£¬À´ËµÃ÷ÕâÁ½¸ö¶«¶«µÄ×÷Óá£
°¸ÀýÃèÊö
¼ÙÉèÄãƽʱÉú»îÔÚ±±¾©£¬ÓÐÌìÄãÈ¥Ò»¸öºÜ±ßÔ¶ºÜƶÇîµÄɽ´åÌåÑéÉú»î£¬µ½ÁËÄǸ ......
org.apache.commons.net.ftp.*ÖеÄFTPClientÀàʵÏÖµÄFTPÉÏ´«ÏÂÔع¦ÄÜ£º
Ðèµ¼ÈëApacheµÄcommos-netµÄjar°ü£¬Èôµ¼ÈëµÄÊÇ1.4°æ±¾µÄ°ü£¬ÔòFTPFile[] fileList = ftpClient.listFiles()µÄÖ´Ðйý³ÌÖпÉÄܻᱨ´í£¬´Ëʱ¸ü»»µ¼Èë2.0°æ±¾µÄjar°ü£¬ÎÊÌâ¼´¿É½â¾ö¡£
´úÂëÈçÏ£º
package com.java.ftp;
import java.io.File;
import ......