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. 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]
Answers
Answered by
41
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].
Answered by
2
Answer:
this answer is correct and the please click the brand list
Attachments:
Similar questions