Skip to main content

Practice ยท 2 of 4

Overloads that delegate

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.

Difficulty: beginner

Back to lesson: Practice: Practice: Utility Library