new Runnable() but no new thread?

前端 未结 8 2170
名媛妹妹
名媛妹妹 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:25

    If you want to create a new Thread...you can do something like this...

    Thread t = new Thread(new Runnable() { public void run() { 
      // your code goes here... 
    }});
    

提交回复
热议问题