Using timer in Android Studio : I got a problem with timer. After 2 sec instead of this action i got error.enter code here

    

    public class MainActivity extends AppCompatActivity {
    
        private TextView tv;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
    
            
             tv = (TextView)findViewById(R.id.tv);
    
            Timer timer=new Timer();
            
            TimerTask timerTask = new TimerTask() {
                @Override
                public void run() {
                    tv.setText("why?");
                }
            };
    
            timer.schedule(timerTask,2000);
        }
    
    
    
    }
How to fix this?