Solved

For Example, We Have a BufferedReader Reader, Associated with the Json

Question 8

Multiple Choice

For example, we have a BufferedReader reader, associated with the json file through InputStreamReader . To get a file data we can do this:


A) var line: String? try {    while (reader.readLine() . also { line = it } != null) {        builder.append(line)    }    val json = JSONObject(builder.toString() )    return json } catch (exception: IOException) {    exception.printStackTrace() } catch (exception: JSONException) { }    while (reader.readLine() . also { line = it } != null) {
B) var line: JSONObject ?    while (reader.readJSONObject () . also { line = it } != null) {    while (reader.readJSONObject () .
C) } catch (exception: RuntimeException) { } catch (exception: ArrayIndexOutOfBoundsException) {

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions