+ 1

Using StringBuilder generate a string "a" and concat a string "0" with ten thousand times. (Java)

After concating two strings, printing out how much time did it cost and how many memory did it use.

18th Oct 2017, 1:41 PM
Agnès Lee
2 Answers
+ 1
Use the timeit module in python. Other programming languages, I frankly don't know.
18th Oct 2017, 4:54 PM
Aryaman Srivastav
Aryaman Srivastav - avatar
0
hi, Aryaman. Thanks anyway but I would like to know how to do it with java. Thanks for reminding me I forgot to specify the language.
19th Oct 2017, 12:53 AM
Agnès Lee