0

how to store for loop string data in Array out side of the for loop in java?

Customer dtls = new Customer(); String missing = dtls.getList(stingName, intAge, intMob, stingDOB); JSONArray mJsonArray_miss_dtls = new JSONArray(missing); String miss = ""; for (int k = 0; k < mJsonArray_miss_dtls.length(); k++) { JSONObject missingObject = mJsonArray_miss_dtls.getJSONObject(k); String s1 = missingObject.getString("DOB"); String[] b = s1.split("T"); String[] b1 = b[0].split("-"); miss = b1[0] + "/" + b1[1]; cnt++; }

18th Jan 2018, 7:57 AM
Krishanu Debnath
Krishanu Debnath - avatar
1 Answer
0
string arr[] // of size n for(int i=0;i<n;i++) { arr[i]=scan. nextline(); }
18th Jan 2018, 8:54 AM
shobhit
shobhit - avatar