A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. For example, navigating away from an email before you send it triggers a "Draft saved" toast to let you know that you can continue editing later. Toasts automatically disappear after a timeout.
Here is a method called toast. This method takes a string parameter as the message like "hi, this is a message". Now when you call toast it displays immediately.