Dart by Example: Hello World

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

You can also use arrow function syntax:

main() => print('Hello, World!');
$ dart hello_world.dart
Hello, World!

Edit on DartPad