Ad
  • Custom User Avatar

    The initial solution setup uses a varargs parameter:

    public static String whoLikesIt(String... names) {
    

    and these can be called either as whoLikesIt("Alice", "Bob") or as whoLikesIt(new String[]{"Alice", "Bob"}). So if you just keep the varargs everything works.