+ 2

can we make a loop in java of repeating same question for 10 times with a line code ?

27th Sep 2017, 6:32 AM
Raghav Khullar
Raghav Khullar - avatar
2 odpowiedzi
+ 12
for (int i=0; i<10; i++) System.out.println("question?");
27th Sep 2017, 1:09 PM
Tashi N
Tashi N - avatar
+ 4
yes, use for loop, it is also covered in sololearn Java tutorial.
27th Sep 2017, 6:48 AM
AutomatedpROCESSES
AutomatedpROCESSES - avatar