โ Back to Miscellaneous
Question 405
Join Strings with String.join
Join Strings with String.join
An arrayfruits = {"apple", "banana", "cherry"}is given. UseString.jointo join the elements with", "(a comma followed by a space) and print: apple, banana, cherry UseString.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.