0 votes
in JAVA by

Which of the following is true about the StringJoiner class in Java 8?

a) It is used to join two strings into a single string.

b) It is used to concatenate two strings into a single string.

c) It is used to create a comma-separated list of strings.

d) It is used to format strings.

1 Answer

0 votes
by

Answer: c) It is used to create a comma-separated list of strings.

Explanation: The StringJoiner class is used to create a sequence of strings separated by a delimiter, such as a comma, and optionally with a prefix and suffix.

Related questions

0 votes
asked May 7, 2021 in JAVA by sharadyadav1986
0 votes
asked Jan 24, 2021 in JAVA by rajeshsharma
...