Okay in Java we also have something called the loops. So let's say in Java if you want to print something like this Ah System dot out dot println lie until previous 1231234567. I want to print and do that see 100. So he will be very difficult to write audience System dot out dot print line 100 times to print one to 100 but we can use these Java loops are these loops in the Java programming to do adisa. To do all these kind of tasks, we can do something like this. So, in Java programming we have this for loop.
So for integer i equals zero, i less than c i want to print 100 times 100 i plus plus. Okay, now I do something like System dot out dot println green lie preen I. Okay Dahlia Korea RUN RUN project. I will be printing from one to 100 starting from zero. So ah Hold on. How does these four Luba work?
How that is follow works, so actually is tough on integer i equals zero so we say i is equal to zero then when I say less than 100 we always increment i see, increment i by i see one. So what it means is that for i equal to zero when I was 15 this statement yo this condition here is less than one and I keep printing these System dot out dot print line then I will increment I buy one. So, I will keep on printing print Dena in repeating and do this I will say this center condition here is I is more than 100 then I will break out from these follow so, I can also do the same thing for a while loop. So, for follow I can change this to a while loop, so, integer i equals zero then wha i less than 100 and System dot out dot println lie I okay so I can comment on this I can Do this okay, I ran this infinite loop zozo zero.
So I have to find a way to stop this. Stop doing Randy's thing. Okay. Why? Why is Kiva giving me a printing zero, we usually call this input angle because integer is equal to zero, then y is less than one and it will keep on printing these printing this eye. So it will carry on printing and printing and printing because I is always equal to zero.
If we want to break out from this loop, we have to do something I prosperous. So every time I look one time, I will be B plus one I will be incremented. So, when he when he one time increment by one looks like entire B two and looked at me he will be three. So, in this case then the after this I have been incremental until 100 he will break out from these loop. So, we can run the project see. So, we have the same results follow for myself I prefer the follow because follow everything is the crayon in front.
So, we will no no miss anything Oh no forget to put in these High Pass Pass inside the loop, we did not put in your become a infinite loop.