if(<condition>) <body>
ternary operator ? :
<condition> ? <true> : <false>
example:
boolean found = true;
int n = found ? 10 : 20; //output 10
for(<initialisation>,<guard or condition>, <increment or decrement expression>) <body>
syntactically correct loop:
for(;;);
up:
for(int i=0; i<10;i++){
low:
for(int j=0;j<5;j++)
{
if(i == 5 && j ==4){
break up;
}
if(j==1) continue;
if(i==4) break low;
System.out.println(i+" "+j);
}
}
declaration and initiatialisation
while(<condition>) {
<body>
<increment or decrement expression> }
declaration and initiatialisation
do { <body> }
while(<condition>) ;