Which of the following is the correct syntax for displaying a toast message for a long length of time?

A. ?Toast.makeText(MainActivity.this, Toast.LENGTH_LONG.show("A toast message");
B. Toast.makeText(MainActivity.this, "A toast message", Toast.LENGTH_LONG).show( );
C. ?Toast.LENGTH_LONG(MainActivity.this, "A toast message", Toast.makeText).show( );
D. ?Toast.show(MainActivity.this, "A toast message", Toast.makeTest).LENGTH_LONG;


Answer: B

Computer Science & Information Technology

You might also like to view...

StreamReader method ___________ reads a line of text from a file.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A table ________ applies borders and fill colors to the entire table

A) style B) theme C) format D) effect

Computer Science & Information Technology

An event occurs as a result of the user interacting with the Web page

Indicate whether the statement is true or false

Computer Science & Information Technology

Identify the duration set by the Payment Card Industry (PCI) Data Security Standard to store a user's card data in the event of dispute with the card holder.

a. 6 months b. 12 months c. 18 months d. 24 months

Computer Science & Information Technology