android - Lifetime of anonymous object run as thread in Java -


within method have following,

runnable r = new runnable() {                     public void run() {                        ...                        ...                      }                                        };                               new thread(r).start(); 

what lifetime of anonymous object , thread ?

what lifetime of anonymous object , thread ?

1) thread keeps running until stop it.

2) object scope(r) in method.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -