android - Don't know how use wait() and notify() in Java -
this question has answer here: how use wait , notify in java? 12 answers i want make inside thread return did string, , i'd wait string other thins. i've been reading wait() , notify() dint it. can me? here create thread operations new thread( new runnable() { @override public void run() { synchronized(mensaje) { try { mensaje.wait(); mensaje = getfilesfromurl(value); } catch (interruptedexception e) { e.printstacktrace(); } } } }).start(); and here wait string mensaje changes if string not "" show button , text synchronized(mensaje) { if (mensaje.equals("")) { try { mensaje.wait(); } catch (interruptedexception e) { e.printstacktrace(); } } btnok.s