+ 10

How can I do in Java that something repetes without to stop?👍🏼

????❓❔

26th Oct 2018, 2:30 PM
T4buk_JR
T4buk_JR - avatar
11 Answers
+ 7
Yes i know thx
27th Oct 2018, 10:51 AM
T4buk_JR
T4buk_JR - avatar
+ 6
while (true){ System.out.println("Thank you very much😀👍🏼");}
26th Oct 2018, 2:50 PM
T4buk_JR
T4buk_JR - avatar
+ 5
Thanks but I mean ...for example: I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java I learn Java with out stop .....
26th Oct 2018, 2:45 PM
T4buk_JR
T4buk_JR - avatar
+ 5
very simple with loop a = 1 while a>0 increment "a"
27th Oct 2018, 10:51 AM
Florinn
Florinn - avatar
+ 4
infinite loop you mean? Few examples: while(true){} for (;;){}
26th Oct 2018, 2:38 PM
Dmytro
+ 4
for(;;);
27th Oct 2018, 12:47 PM
Abhishek Tandon
Abhishek Tandon - avatar
+ 3
for(;;){ //Your code here }
27th Oct 2018, 3:19 AM
Potato Hacker
Potato Hacker - avatar
+ 2
so put text inside while or for, like while(true) { System.out.println("I learn Java"); }
26th Oct 2018, 2:47 PM
Dmytro
+ 2
public class Program { public static void main(String[] args) { int i=1;//constant value while(i==1)//condition will never get false { System.out.println("any thing you wanna write"); } } }
26th Oct 2018, 8:06 PM
Saad Maqsood
Saad Maqsood - avatar
+ 2
you could also make a variable containing the sring you wish to make forever the use the system provided above exept replace the text part with your variable like so while(true){ var a; a = “I repeat forever”; System.out.printIn(a); } atleast I think this would work?
26th Oct 2018, 11:06 PM
Awesome Homeschooler
Awesome Homeschooler - avatar
+ 2
a = 1 while a>0 increment "a"
27th Oct 2018, 3:56 AM
Zach N.
Zach N. - avatar