Companies

Report a typo

You're given a sequence of strings separated by spaces. Read the sequence from the standard input and store all strings in a list. Output the list to the standard output using System.out.println(yourList).

The order of elements must be the same as in the input.

Sample Input 1:

Google Oracle JetBrains

Sample Output 1:

[Google, Oracle, JetBrains]
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic