hashcodemethod has been added to all classes.
equalsas an equivalence relation. Specifically, the implementation is based on
instanceof, which ensures symmetry when the method is invoked across inheritance heirarchies.
getRandommethod has been overloaded so clients need not invoke it with
falseto get a fresh instance.
getNextis deprecated. Iterator-based traversals are provided instead.
ToolBoxutility has new static methods for BMI and Mortgage calculations.
hashcodemethod has been added to the following classes in the lib package:
Fractionhas been changed so it returns only the whole part if the numerator is divisible by the denominator.
Moneywas corrected. The bug led to a different percentages of objects than the API specifies.
Options) will not work and you will need to download the latest TYPE jar file.
Stockclass with a simulated "stock exchange".
type.utilto ease the transition to J2SE 5.0. The plan is to deprecate
type.langgiven the full support of console and file I/O in Java 5.0.
UniPanelgraphics in your app regardless of console. You can, for example, run such an app in DOS, Eclipse, or any other environment.
lanuchmethod to the
IOclass to facilitate app testing.
CreditCardclass to expose aggregation issues.
CreditCardclass and its
RewardCardsubclass to expose cross-class overloading.
writeObjectmethods in the
IOclass enable you to save a whole object (in one shot) in a binary file, and then load it back (with automatic recursive instantiation). This is most useful for data-centric app's: the entire collection can be stored in one call.
IOenables you to get or set the working directory for file I/O.
assertas a keyword in J2SDK 1.4, the
yorkpackage had to be modified. This, plus the need for exception handling, object serialization, and a GUI interface that supports a console and a graphics panel, have led to the
If you have software that uses
york, its class files will
still run correctly, but if you need to recompile under 1.4 then you
will get warnings. The steps needed to upgrade your source files are:
System.out) to the
YorkWriter) constructor, then replace by using the default constructor of
type.lang.SEclass (Software Engneering) has four methods each of which behave exactly like
assertbut throws a custom (unchecked) exception based on context: precondition, postcondition, invariant, and check. You will therefore replace assert(...) by