我有一个我创建的线程
List<String> list_of_stocks = Arrays.asList("AAPL", "NFLX");
StockThread stockthread = new StockThread(list_of_stocks);
stockthread.start();
这StockThread被定义为:
public class StockThread implements Runnable {
List<String> list_of_stocks;
public StockThread(List<String> list_of_stocks){
this.list_of_stocks = list_of_stocks;
}
@Override
public void run() {
/* So this thread simply has a */
StockObserver so = new StockObserver(this.list_of_stocks, 1);
so.getStockPrices();
}
}
但是 stockthread 的 start() 方法显示为“无法解析符号”。
我不明白这是什么罪过。这应该是一种可访问的方法,因为我已经实现了 runnable no?
哔哔one
qq_笑_17
相关分类