publicstaticvoid main(String args[]) throws Exception { // boolean wrapper boolean b = false; Boolean B = newBoolean(b); if (!B.toString().equals(Boolean.toString(b))) thrownew RuntimeException("Boolean wrapper toString() failure.");
b = true;
B = newBoolean(b); if (!B.toString().equals(Boolean.toString(b))) thrownew RuntimeException("Boolean wrapper toString() failure.");
// char wrapper for(int x=0; x<100; x++) { char c = (char)generator.nextInt();
Character C = new Character(c); if (!C.toString().equals(Character.toString(c))) thrownew RuntimeException("Character wrapper toString() failure.");
}
// byte wrapper for(int x=0; x<100; x++) { byte y = (byte)generator.nextInt(); Byte Y = newByte(y); if (!Y.toString().equals(Byte.toString(y))) thrownew RuntimeException("Byte wrapper toString() failure.");
}
// short wrapper for(int x=0; x<100; x++) { short s = (short)generator.nextInt(); Short S = newShort(s); if (!S.toString().equals(Short.toString(s))) thrownew RuntimeException("Short wrapper toString() failure.");
}
// int wrapper for(int x=0; x<100; x++) { int i = generator.nextInt();
Integer I = new Integer(i); if (!I.toString().equals(Integer.toString(i))) thrownew RuntimeException("Integer wrapper toString() failure.");
}
// long wrapper for(int x=0; x<100; x++) { long l = generator.nextLong(); Long L = newLong(l); if (!L.toString().equals(Long.toString(l))) thrownew RuntimeException("Long wrapper toString() failure.");
}
// float wrapper for(int x=0; x<100; x++) { float f = generator.nextFloat(); Float F = newFloat(f); if (!F.toString().equals(Float.toString(f))) thrownew RuntimeException("Float wrapper toString() failure.");
}
// double wrapper for(int x=0; x<100; x++) { double d = generator.nextDouble(); Double D = newDouble(d); if (!D.toString().equals(Double.toString(d))) thrownew RuntimeException("Double wrapper toString() failure.");
}
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.