new Runnable() but no new thread?

前端 未结 8 2175
名媛妹妹
名媛妹妹 2020-12-08 11:11

I\'m trying to understand the code here , specifically the anonymous class

private Runnable mUpdateTimeTask = new Runnable() {
public void run() {
   final l         


        
8条回答
  •  情歌与酒
    2020-12-08 11:45

    You can create a thread just like this:

     Thread thread = new Thread(new Runnable() {
                        public void run() {
    
                           }
                        });
                    thread.start();
    

    Also, you can use Runnable, Asyntask, Timer, TimerTaks and AlarmManager to excecute Threads.

提交回复
热议问题