I don’t get it | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I don’t get it

WhY DO YOU EVEN NEED LOOPS I AM STUCK

26th Jan 2020, 7:03 PM
Mohammed Elbaba
5 Answers
+ 7
The Purpose Of Loops The purpose of loops is to repeat the same, or similar, code a number of times.  This number of times could be specified to a certain number, or the number of times could be dictated by a certain condition being met.  There are usually a number of different types of loops included in programming languages including for loops, while loops and do….while loops. Ref : https://www.dpscomputing.com/blog/2012/09/13/programming-the-purpose-of-loops/
26th Jan 2020, 7:05 PM
Rstar
Rstar - avatar
+ 1
Try to run this piece of code. Report what happened. ;-) public class Program { public static void main(String[] args) { while(true) System.out.println("Yay!"); } }
26th Jan 2020, 7:18 PM
HonFu
HonFu - avatar
0
cool
26th Jan 2020, 7:06 PM
Mohammed Elbaba
0
it said yay
26th Jan 2020, 7:19 PM
Mohammed Elbaba
0
How often? 😏
26th Jan 2020, 7:30 PM
HonFu
HonFu - avatar