hello guys
program to illustrate the use of brake statement in for loop.
Answers
Answered by
1
★ SOLUTION →
public static void main ()
{ int num = 0;
while ( num <= 100)
{ System.out.println ( value of variable);
if (num == 2)
break;
num++;
}
System.out.println ( "Out of while-loop");
}}
public static void main ()
{ int num = 0;
while ( num <= 100)
{ System.out.println ( value of variable);
if (num == 2)
break;
num++;
}
System.out.println ( "Out of while-loop");
}}
AtifJr:
UR WELCOME ;-)
Similar questions