21
(Choose 1 answer)
Which statement is not allowed on the below block?
Thread
t = new Thread(new Runnable() {
@Override public void run() {
try {
synchronized (this){
wait(1000);
((TextView) findViewById(R.id.textView)).setText("Thread is running....");
} catch (InterruptedException e) { e.printStackTrace(); } }
}
});
t.start();
A. synchronized statement
B. wait statement
C. setText statement
D. All statements are allowed