i want to somehow check if blah.equals("") after 20 seconds, can anyone help me?Code:public class Test { public static void main(String[] args) { long startTime = System.nanoTime(); String blah = ""; while(true) { System.out.println("testing"); if (System.nanoTime() - startTime > 20000) break; } } }




Reply With Quote