1. 程式人生 > >非法前向引用

非法前向引用

 

private Runnable dbThread = new Runnable() {
@Override
public void run() {
}
public Runnable updateStockRun = () -> {
    executorService.execute(dbThread);
};

 

dbThread必須先定義,否則會報錯