CJCoding With Joseph

Join Strings with String.join

An array fruits = {"apple", "banana", "cherry"} is given. Use String.join to join the elements with ", " (a comma followed by a space) and print:

apple, banana, cherry

Use String.join(", ", fruits).

Expected Output:

apple, banana, cherry
Topics:
Miscellaneous
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.