Solved

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

Question 49

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents