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
void main()
This line defines the main function where the program execution begins. Thevoid
keyword indicates that the function does not return any value.{
This opening brace marks the beginning of the main function's body.print('Hello, World!');
This line prints the string "Hello, World!" to the standard output (usually the screen).}
This closing brace marks the end of the main function's body.