Hello World Program in Dart



In this tutorial, we will learn how to write a Hello World program in Dart language. We will go through each statement of the program.

Dart Program

void main() {
    print('Hello, World!');
}

Output

Hello, World!

Working of the "Hello, World!" Program

  1. void main()
    This line defines the main function where the program execution begins. The void keyword indicates that the function does not return any value.
  2. {
    This opening brace marks the beginning of the main function's body.
  3. print('Hello, World!');
    This line prints the string "Hello, World!" to the standard output (usually the screen).
  4. }
    This closing brace marks the end of the main function's body.