xxxxxxxxxx
// Starting on 0:
for(int i = 0; i < 5; i++) {
System.out.println(i + 1);
}
// Starting on 1:
for(int i = 1; i <= 5; i++) {
System.out.println(i);
}
xxxxxxxxxx
for(initialization; condition ; increment/decrement)
{
statement(s);
}
xxxxxxxxxx
{
"id": 386261073,
"nickname": "REVENDEDOR_AUTORIZADO _APPLE",
"registration_date": "2018-12-12T14:34:01.000-04:00",
"country_id": "BR",
"address": {},
"user_type": "brand",
"tags": [],
"logo": null,
"points": 668,
"site_id": "MLB",
"permalink": "http://perfil.mercadolivre.com.br/REVENDEDOR_AUTORIZADO+_APPLE",
"seller_reputation": {},
"buyer_reputation": {},
"status": {}
}
xxxxxxxxxx
package com.company;
public class Main {
public static void main (String[] args) {
System.out.println("loop started");
for (int i = 0; i < 10; i++) {
if (i==5){
continue;
}
System.out.println(i);
}
System.out.println("loop over");
}
}
xxxxxxxxxx
int number = 12;
for(int i = 0; i < number; i++){
System.out.println(i);
}