public boolean getBoolean(int index) throws JSONException {
        Object o = get(index);
//#if CLDC!="1.0"
//#         if (o.equals(Boolean.FALSE) ||
//#else
            if (o.equals(JSONObject.FALSE) ||
//#endif
                (o instanceof String &&
                ((String)o).toLowerCase().equals("false"))) {
            return false;
//#if CLDC!="1.0"
//#         } else if (o.equals(Boolean.TRUE) ||
//#else
        } else if (o.equals(JSONObject.TRUE) ||
//#endif
                (o instanceof String &&
                ((String)o).toLowerCase().equals("true"))) {
            return true;
        }
        throw new JSONException("JSONArray[" + index + "] is not a Boolean.");
    }