ia asked in 電腦與網際網路程式設計 · 1 decade ago

請問java thread怎麼用?

請問java thread怎麼用?

try catch怎麼用?

怎麼開一個影像檔?

2 Answers

Rating
  • 1 decade ago
    Favorite Answer

    1. 有兩種分法: Implement Runnable interface(介面) or extend Thread class.

    Thread Class usage:

    public class threadTest extends Thread{

    public void run(){

    }

    }

    Runnable Interface usage:

    public class threadTest implements Runnable{

    Thread thread;

    public void run(){}

    }

    2.try{

    例外測試區..your code

    }catch(例外型別-例外名 variable-name){

    例外處理區..your code

    }

    2008-01-30 01:46:50 補充:

    3. 要開影像檔. 要用JMF

    2008-01-30 22:40:05 補充:

    在Sun的網站裡或是 javaworld 都有詳細的範例

    http://www.javaworld.com.tw/jute/post/view?bid=29&...

    http://java.sun.com/products/java-media/jmf/2.1.1/...

  • 1 decade ago

    有沒有一個開檔的例子?

Still have questions? Get your answers by asking now.