Computer Science, asked by Sowparnika350, 11 months ago

Write a program that accepts two strings as command line arguments and generate the output in the required format. Example: if the two command line arguments are wipro and bangalore then the output generated should be wipro technologies bangalore. If the command line arguments are abc and mumbai then the output generated should be abc technologies mumbai

Answers

Answered by prashilpa
0

class A

{

 public static void main(String args[])

 {

  System.out.println(args[0] + “ technologies ”);

  System.out.println(args[1]);

   }

}

Above is a java code for taking 2 command lines argument strings are printing them as given format.

The first argument is printed by args[0]

the + sign concatenates the strings. (with string technologies)

Then second argument is printed by args[1].

Similar questions