Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Sunday, December 2, 2007

How to Using the break Statement in java



Using the break Statement



Using the break Statement


<%
double array[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int sum = 0;

for(int i = 0; i <
array.length; i++) {

sum += array[i];
if (sum > 12) break;
out.println("Looping...
");
}
out.println("The sum exceeded the maximum allowed value.");
%>

No comments: