1.子线程代码
package com.vince.xq.kafka.thread; public class ThreadOne implements Runnable { private int i; public ThreadOne(int i) { this.i = i; } @Override public void run() { int x = 10 / 0; System.out.println(i); } }
2.主线程调用处理
1.子线程代码
package com.vince.xq.kafka.thread; public class ThreadOne implements Runnable { private int i; public ThreadOne(int i) { this.i = i; } @Override public void run() { int x = 10 / 0; System.out.println(i); } }
2.主线程调用处理