0

Hey anybody please tell me how I can multiply a string *10 times in Java. , ,,, for example in python

In python we do like ,,,print("string" *2) #Output== "stringstring" ,, how I can do this in Java

15th Aug 2020, 6:14 AM
Sumit Sinha
Sumit Sinha - avatar
2 odpowiedzi
+ 1
There’s a great site name Google (https://google.com). With it, you can search the world's information, including webpages, images, videos and more. Using Google, search up “java repeat string n times” and I assure you you will find an answer.
15th Aug 2020, 6:21 AM
Rowsej
Rowsej - avatar
0
There are java libraries called StringUtils and String. You can use those to repeat a string the no. Of times you need... Ex: StringUtils.repeat("xyz",10) OR Strings.repeat("xyz",10) Anything..your wish
15th Aug 2020, 6:26 AM
sarada lakshmi
sarada lakshmi - avatar