-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUseThree.java
More file actions
27 lines (24 loc) · 799 Bytes
/
UseThree.java
File metadata and controls
27 lines (24 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/******************************************************************************
* Compilation: javac UseArgument.java
* Execution: java UseArgument yourname
*
* Prints "Hi, Bob. How are you?" where "Bob" is replaced by the
* command-line argument.
*
* % java UseArgument Bob
* Hi, Bob. How are you?
*
* % java UseArgument Alice
* Hi, Alice. How are you?
*
******************************************************************************/
public class UseThree {
public static void main(String[] args) {
//System.out.print("Hi, ");
//System.out.print(args[0]);
//System.out.print(" ");
//System.out.print(args[1]);
//System.out.println(". How are you?");
System.out.println( "Hi, "+args[0]+", "+args[1]+", "+args[2]+". How are you?");
}
}