publicclass Varargs1 { staticint f(String s, int a, short b) { return1;
} staticint f(String s, int a, int b) { return2;
} staticint f(String s, Integer ... args) { return3;
} staticint f(String s, Number ... args) { return4;
} staticint f(String s, Object ... args) { return5;
} staticint f(int ... args) { return6;
} staticvoid check(int expected, int actual) { if (actual != expected) thrownew AssertionError(actual);
} publicstaticvoid main(String[] args) {
check(1, f("x", 12, (short)13));
check(2, f("x", 12, 13));
check(3, f("x", 12, 13, 14));
check(4, f("x", 12, 13.5));
check(5, f("x", 12, true));
check(6, f(12, 13));
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-10-01)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.