interface A extends Cloneable
{ public Object clone() throws CloneNotSupportedException;
} interface B extends A
{ } interface C extends A
{ } interface D extends B, C
{ }
publicclass CloneableProblem implements D
{ privateint i; public CloneableProblem(int i)
{ this.i = i;
} public Object clone()
{
CloneableProblem theCloneableProblem = null; try
{
theCloneableProblem = (CloneableProblem) super.clone();
theCloneableProblem.i = i;
} catch (CloneNotSupportedException cnse)
{ } return theCloneableProblem;
} publicstaticvoid main(String argv[])
{ try
{
A a0 = new CloneableProblem(0);
A a1 = (A) a0.clone();
B b0 = new CloneableProblem(0);
B b1 = (B) b0.clone();
C c0 = new CloneableProblem(0);
C c1 = (C) c0.clone();
D d0 = new CloneableProblem(0);
D d1 = (D) d0.clone();
} catch (CloneNotSupportedException cnse)
{ }
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.