Loop Control Statements Part- 2 Using for and while Loop in JAVA LEC-10
JAVA PROGRAMMING LECTURE N0-10
Loop Control statements Part-2:
Loop :- A loop is defined as a block of statements which are repeatedly executed for certain number of times.
Java language provides for three constructs for performing loop operations :-
1) The while statement
2) The do statement
3) The for statement
1
12
123
1234
12345
Q-No-: WAP to print this series using for loop.
1
22
333
4444
55555
Q-No-2: WAP to print this series using for loop.
12345
1234
123
12
1
Q-No-3: WAP to print this series using for loop.
1
12
123
1234
12345
Q-No-4: WAP to print this Pyramid using for loop.
*
***
*****
*******
*********
Q-No-5: WAP to enter number and check no. is prime or not.
Q-No-6: WAP to enter number and reverse its digit.
Q-No-7: WAP to enter number and print sum of its digit
What are loop control statements in Java?
The Java for loop is a control flow statement that iterates a part of the programs multiple times. The Java while loop is a control flow statement that executes a part of the programs repeatedly on the basis of given boolean condition.
What are loop control statements?
With loop control statements, you can repeatedly execute a block of code. There are two types of loops: for statements loop a specific number of times, and keep track of each iteration with an incrementing index variable.
What are the 3 types of loops in Java?
In Java, there are three kinds of loops which are – the for loop, the while loop, and the do-while loop. All these three loop constructs of Java executes a set of repeated statements as long as a specified condition remains true.
What is the difference between for loop and while loop?
The difference between for loop and while loop is that in for loop the number of iterations to be done is already known and is used to obtain a certain result whereas in while loop the command runs until a certain condition is reached and the statement is proved to be false.
What are the difference between for statement and do while statement?
Difference between for and do-while loop in C, C++, Java. for loop: for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and increment/decrement in one line thereby providing a shorter, easy to debug structure of looping.
Please subscribe my channel for getting video related to information technology.
https://www.youtube.com/channel/UCbSg...
Follow on Facebook: https://www.facebook.com/KIET-PATNA-1...
Follow on Instagram:https://www.instagram.com/nasim.raja.10/
Download KIET PATNA App.
Patna's Top IT training Institute!!
https://play.google.com/store/apps/details?id=com.khadijah.kietpatna
https://www.youtube.com/channel/UCbSgLR_4xKZAl8gd12sKRbg
#kietpatna #KHADIJAHINSTITUTEPATNA #SOFTWARETRAININGKIETPATNA
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Loop Control Statements Part- 2 Using for and while Loop in JAVA LEC-10», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.