J2ME in a nutshell

If-Then Statement:


if ( boolean Expression )
{
//code
}

If-Then-Else Statement:


if ( boolean Expression )
{
//code
}
else if ( boolean Expression )
{
//code
}
else
{
//code
}

Switch Statement:

switch (variable) 
{
case value_1:
//code (only one line);
break;
case value_2:
{
//code (more than one line);
}
break;
}


 

for Statement:


for (i = 0; i < 10; i++)
{
//code
}

while Statement:

while  (boolean expression)
{
//code
[iteration;]
}


Department of Electronic Systems | Aalborg University | Niels Jernes Vej 12 | DK-9220 Aalborg | Denmark
Phone: (+45) 9635 8695 | Fax (+45) 9815 1583 | E-mail ies(at)ies.aau.dk
Copyright © 2006 Department of Electronic Systems

Last update:11-10-2006