Practice · 2 of 4
Overloads that delegate
CHALLENGE
Difficulty: beginner+25 XP
Create a family of join overloads that all delegate to one core:
- static String join(String sep, String a, String b)
- static String join(String sep, String a, String b, String c)
- static String join(String sep, String... parts) — varargs core
Each joins with the separator between items (join("-", "a", "b") is "a-b"). The two fixed overloads must CALL the varargs one rather than duplicating logic.
Press Submit to check your solution.
Back to lesson: Practice: Practice: Utility Library