"While" loop takes only one part as it condition or expression that is Termination.
public class While_Demo
{
public static void main(String[] args)
{
int var = 1;
while(var <= 10)
{
System.out.println(var);
var++;
}
}
}
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment