Sullivan Market

a web based full-circle development system



My Java Tutorials - Control Structures

For Example...


switch (the Java case ctatement)

switch (charToCheck) 
{
    case 'A' : x = 1; break;
    case 'B' : x = 2; break;
    default  : x = 0;
}  

if else

if (x > 5)
{
    System.out.println("x is greater than 5");
}
else
{
    System.out.println("x is not greater than 5");
}






Back To Java Tutorials

©2012 SullivanMarket.com