Get the object value associated with an index. @param index The index must be between 0 and length() - 1. @return An object value. @throws JSONException If there is no value for the index.
(int index)
| 191 | * @throws JSONException If there is no value for the index. |
| 192 | */ |
| 193 | public Object get(int index) throws JSONException { |
| 194 | Object object = opt(index); |
| 195 | if (object == null) { |
| 196 | throw new JSONException("JSONArray[" + index + "] not found."); |
| 197 | } |
| 198 | return object; |
| 199 | } |
| 200 | |
| 201 | |
| 202 | /** |
no test coverage detected