Skip to content
Justice Tech School

Command Line Arguments

Arguments arrive as a list of strings in main.

Example
void main(List<String> args) {
  if (args.isEmpty) {
    print("no args");
    return;
  }
  print(args.join(","));
}

Exercise

Argument list.

void main(List<> a)

Quiz Test

What type are the arguments?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.