我只是在這裏停留了五個小時,我只想獲得信息的價值,這是櫃檯,並從零開始,但是當給定的條件滿足,我只是想得到櫃檯的價值。有沒有更好,更簡單的方法來獲得這個?
我下面的代碼:java如何停止循環,並獲得計數器的值
for(int info = 0; info<currentData.length();info++) {
JSONObject managedata = currentData.getJSONObject(currentData.length() - 1);
long getcurrenttime = managedata.getLong("dt");
while (getcurrenttime > currentEpochTime) {
// i want to get the 'info' value here when the following condition meet.
}
感謝,但現在幫助,我只是想獲取信息的價值它將停止,它將打印從零開始的所有信息值。 – suresh