各位我想让这个程序运行10秒钟!可为什么总是在while语句出现不兼容的类型,怎么回事怎样该?
public class TestTime{
public static void main(String[] args){
long startTime=System.currentTimeMillis();
long currentTime;
long runTime=10000L;
long endTime=startTime+runTime;
while(currentTime=System.currentTimeMillis()<endTime){
 
}
System.out.println("结束");
}
}