下記のようなプログラムを書いたのですが、エラーが出てしまいました。
マルチスレッドで送信元のスレッドから各スレッドに別々の変数を受け渡す
方法はないでしょうか?
public class sampleL{
public static void main(String args[]){

sampleM samplem = new sampleM();
Thread th = new Thread(samplem);
for(int p=0;p<3;p++){
th.start(p); <-ここでエラーが出ます。
}
}
}
class sampleM extends Thread {
public void run(int p){
System.out.println(p);
}
}