How can i multiply a string in java just like python.cause i wanted to make a programme which prints a string multiple times. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i multiply a string in java just like python.cause i wanted to make a programme which prints a string multiple times.

Please tell the code for it . Python has the Print*("hjkgvb"*7) and bam the code gets printed 7 times but not in Java.

29th Apr 2020, 8:31 AM
V S
V S - avatar
3 Answers
+ 4
System.out.println("something\n".repeat(7));
29th Apr 2020, 9:22 AM
zemiak
0
Please briefly describe the same .~ swim ~
29th Apr 2020, 9:09 AM
V S
V S - avatar
0
Ok yeah . Now I get it you are talking about system loops ~ swim ~
29th Apr 2020, 9:14 AM
V S
V S - avatar