control statements in java
Post on 22-May-2015
1.345 Views
Preview:
TRANSCRIPT
CONTROL STATEMENTS IN JAVA
Shashwat Shriparvdwivedishashwat@gmail.com
InfinitySoft
JAVA CONTROL STATEMENTS
Java’s selection statements
Eg:
elseif
Eg:
switch
//A simple example of the switch
Java’s Iteration Statements
//A simple example of while loop
do-while
//A simple example of do-while loop
for
Java’s Jump statements
Using break to exit a loop
//Using break to exit a loop
Using break as a form of Goto
The general form of the labeled break statement is
// Using break as a civilized form of goto
continue
Eg:
return
Eg:
Shashwat Shriparvdwivedishashwat@gmail.com
InfinitySoft
top related