AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 — 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( );

Show Answer
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

1 comment
Sign in to comment
MmadiOption: B
Dec 31, 2022

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