If when launching a Midlet in netbeans emulator the above errors, then check if any jar file is being used which is created using Java 1.5 and above.
Tuesday, November 24, 2009
Wednesday, November 11, 2009
Null Pointer Exception in Java
Item array in J2ME : While initializing a Form object in J2ME application the corresponding label as well as items array might not be null. But this can throw NullPointerException if any one element of items array is null.
Hashtable : If Hashtable is used in our application ,then any manipulation of its reference prior creating the object will throw NullPointerException.
String array : If String array is initialized at the beginning, but , if at a later point , if that String array calls a function which returns null, then , trying to get the length of that String array will throw NullPointerException
Subscribe to:
Comments (Atom)