Option 1:

String newStr = someStr + 3 + "]";

Option 2:

String newStr = someStr + "3" + "]";

Which option is better with regards to performance, memory and general practice? What are some recommended tools/ways I can use to measure memory usage of my code and its performance (besides measuring the start time and the end time and calculate the difference)

Edit
Report