non static variable this cannot be referenced from a static context
编译以下代码时收到错误;问题是什么?
class bwCalc {
class Tst{
public void tst() {
byte[] data = new byte[1024];//1 kb buffer
int count;
long startedAt = System.currentTimeMillis();
while((System.currentTimeMillis()-startedAt)<1) {
System.out.println("hello\n");
}
}
}
public static void main(String argc[]) {
Tst c = new Tst();
c.tst();
}
}