processCommandas-を修正しました。
private void processCommand() throws InterruptedException {
        this.command = "xyz";
}
完全なコード-
import java.util.logging.Level;
import java.util.logging.Logger;
public class WorkerThread implements Runnable {
    private String command;
    public WorkerThread(String s) {
        this.command = s;
    }
    @Override
    public void run() {
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ex) {
            Logger.getLogger(WorkerThread.class.getName()).log(Level.SEVERE, null, ex);
        }
        System.out.println(Thread.currentThread().getName() + " Commad at start :" + command);
        try {
            processCommand();
        } catch (InterruptedException ex) {
        }
        System.out.println(Thread.currentThread().getName() + " Command after processCommand : " + command);
    }
    private void processCommand() throws InterruptedException {
        this.command = "xyz";
    }
}
さて、同期の問題が発生することを期待していますよね? 基本的に、いつ
System.out.println(Thread.currentThread().getName()+' Start. Command = '+command);
実行すると、値を取得できますよxyzね?しかし、私はそれを見ることはありません。Thread.Sleep でさまざまな値を試しました。
this.command = "xyz";では、この場合、ステートメントをスレッドセーフにするのは何でしょうか?
私はこのようにスレッドを開始しています -
ExecutorService executor = Executors.newFixedThreadPool(5);
for (int i = 0; i < 10; i++) {
    Runnable worker = new WorkerThread("" + i);
    executor.execute(worker);
}