Parameters and their values

Report a typo

Consider your program needs to get a few parameters to start working. For example, you want to specify a path on your drive where the program can store output files.

Write a program that takes command-line arguments in the format:

parameter1 value1 parameter2 value2 ...

and outputs them in the standard output in the format:

parameter1=value1
parameter2=value2
...

It is guaranteed, that each parameter is followed by a value.

Please, do not rename the provided class Problem.

Sample Input 1:

config-path /something/there config-format json

Sample Output 1:

config-path=/something/there
config-format=json

Sample Input 2:

mode-name single level 88

Sample Output 2:

mode-name=single
level=88
Write a program in Java 17
class Problem {
public static void main(String[] args) {

}
}
___

Create a free account to access the full topic