Multiple choice

How to set the duration of the Toast by using Toast class?

  1. int Toast.dur=10;

  2. int dur=Toast(10);

  3. int dur=Toast.LENGTH_SHORT;

  4. int dur=Toast.LENGTH_SHORT(10);

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

There are two way to declare the duration of the Toast: int dur=Toast.LENGTH_SHORT; int dur=Toast.LENGTH_LONG;