0PricingLogin
Dart Academy · Lesson

Anatomy of main() and Hello World

Write and run your very first Dart program.

Every Program Has a Start

When you run a Dart program, the computer needs to know where to begin. That starting point is a special function called main. 🏁

The main Function

Dart always looks for main first and runs it automatically. Without a main, your program has no place to start.

void main() {
}

All lessons in this course

  1. What Dart Is and Why It Exists
  2. Install the SDK and Check Your Version
  3. Anatomy of main() and Hello World
  4. Printing, Comments, and Statements
← Back to Dart Academy