[go: up one dir, main page]

0% found this document useful (0 votes)
17 views1 page

LanguageBasics

The document outlines three programming assignments that involve using command line arguments in Java. The first assignment requires generating a specific output format with two string arguments, the second involves printing a welcome message with a single string argument, and the third focuses on calculating the sum of two integer arguments. Each assignment includes examples of expected outputs for clarity.

Uploaded by

jared97599
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

LanguageBasics

The document outlines three programming assignments that involve using command line arguments in Java. The first assignment requires generating a specific output format with two string arguments, the second involves printing a welcome message with a single string argument, and the third focuses on calculating the sum of two integer arguments. Each assignment includes examples of expected outputs for clarity.

Uploaded by

jared97599
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like