1.
Write a Program that accepts two Strings as command line arguments and generate the output
in a specific way as given below.
public class Sample1
public static void main( String args[])
System.out.println(args[0]+"\t"+"technologies");
System.out.println(args[1]);
2. Write a Program to accept a String as a Command line argument and the program should print
a Welcome message.
public class Sample2 {
public static void main(String[] args)
{
for(String string:args)
{
System.out.println("Welcome"+string);
}
}
3. Write a Program to accept two integers through the command line argument and print the sum
of the two numbers
public class Sample3 {
public static void main(String args[])
{
int x,y,s;
x= Integer.parseInt(args[0]);
y= Integer.parseInt(args[1]);
s= x+ y;
System.out.println("Sum of\t"+ x +"\tand\t"+ y +"\tis\t" +s);
}
}