Java Reference
In-Depth Information
Table 2-2. Continued
CLDC 1.0
CLDC 1.1
String
String
StringBuffer
StringBuffer
StringIndexOutOfBoundsException
StringIndexOutOfBoundsException
System
System
Thread
Thread
Throwable
Throwable
VirtualMachineError
VirtualMachineError
Double
Float
NoClassDefFoundError
Reference
WeakReference
Changes to java.lang.Exception
As I stated previously, the exception hierarchy for the java.lang package is significantly
smaller than the hierarchy for Java SE.
Changes to java.lang.Object
The key change to the Object class—and therefore the entire Java hierarchy—is the
absence of the finalize method. As you know, the memory manager invokes a method's
finalize method just before garbage collection; in the CLDC, there's no way to hook the
garbage-collection process in this manner. This is as it should be: memory is often a pre-
cious commodity on Java ME devices anyway, so you should explicitly clean up resources
when you're finished using them.
The Reflection API is also not part of the CLDC; the memory footprint it demands
just isn't feasible. Of course, without reflection, there's no RMI, and without RMI, there's
no Jini—Sun's platform for Java-based distributed computing.
Changes to java.lang.Math
As you might imagine, with the removal of floating-point support in CLDC 1.0, the
java.math class was stripped of floating-point operations, leaving only operations with
all-integer signatures such as min and max . With the reintroduction of floating-point
 
Search WWH ::




Custom Search