Skip to content

Commit 21b5b6b

Browse files
Add the CLDemo class
1 parent 14b8256 commit 21b5b6b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.guide.c5;
2+
3+
// Display all command-line information.
4+
public class CLDemo {
5+
public static void main(String[] args) {
6+
System.out.println("There are " + args.length + " command-line arguments.");
7+
8+
System.out.println("They are: ");
9+
for (int i = 0; i < args.length; i++)
10+
System.out.println("arg[" + i + "]: " + args[i]);
11+
}
12+
}

0 commit comments

Comments
 (0)