Exam AND-401 All QuestionsBrowse all questions from this exam
Question 97

What does the following line of code do?

Toast toast = Toast.makeText(this,"Android ATC", Toast.LENGTH_LONG); toast.setGravity(Gravity.TOP|Gravity.RIGHT, 0, 0); toast.show( );

    Correct Answer: B

    The provided line of code creates a Toast message that displays the text 'Android ATC' and sets its position to appear at the top-right corner of the screen using Gravity.TOP|Gravity.RIGHT.

Discussion
MmadiOption: B

B. The toast will appear on the top-right corner.