如何在处理程序中将java转换为kotlin

如何在处理程序中将java转换为kotlin

new Handler().postDelayed(new Runnable(){ @Override public void run() { /* Create an Intent that will start the Menu-Activity. */ Intent mainIntent = new Intent(Splash.this,Menu.class); Splash.this.startActivity(mainIntent); Splash.this.finish(); } }, 3000); 

 Handler().postDelayed({ /* Create an Intent that will start the Menu-Activity. */ val mainIntent = Intent(this, Menu::class.java) startActivity(mainIntent) finish() }, 3000)