interface Node<T> { @SafeVarargs static Node of(T value, Node... children) { System.out.println(value); System.out.println(children); return null; } @SafeVarargs static Node of(T1... values) { System.out.println(values); return null; } static void test() { Node.of(1, Node.of(2), Node.of(3)); Node.of(1, Node.of(2), Node. of(3)); } } class MyTest { void foo(String... s) { System.out.println(s); } void foo(T t, String t3, T... s) { System.out.println(t); System.out.println(t3); System.out.println(s); } { foo(" ", " ", ""); } }