Topics
No. Hands-on Assignment S tatus
Covered
Write a Program that accepts two Strings as command line
arguments and generate the output in a specific way as given
below.
Example:
If the two command line arguments are Wipro and Bangalore then
the output generated should be Wipro Technologies Bangalore. Co mmand
1 Line
Argument
If the command line arguments are ABC and Mumbai then the
output generated should be ABC Technologies Mumbai
[Note: It is mandatory to pass two arguments in command line]
Write a Program to accept a String as a Command line argument
and the program should print a Welcome message.
Co mmand
2 Example : Line
C:\> java Sample John Argument
O/P Expected : Welcome John
Write a Program to accept two integers through the command
line argument and print the sum of the two numbers
Example:
C:\>java Sample 10 20
O/P Expected : The sum of 10 and 20 is 30
Write a Program to accept two integers through the command line
argument and print the sum of the two numbers Co mmand
3 Line
Argument
Example:
C:\>java Sample 10 20
O/P Expected : The sum of 10 and 20 is 30