PPT Slide
class EchoArgs {
public static void main(String[] args) {
for (int i = 0 ; i < args.length ; i++) {
System.out.println("Argument " + i + ": "
+ args[i]);
}
}
}
Java Program to Print out its Arguments
>javac EchoArgs.java
>java EchoArgs 10 -3 4.5 abc
Argument 0: 10
Argument 1: -3
Argument 2: 4.5
Argument 3: abc
Previous slide
Next slide
Back to first slide
View graphic version