Two bad practices you must avoid in java

Recently i was scanning code using coverity, was amazed to see few bad practices will impact performance of your application.If you never heard or used coverity, will write my article on “How to install and use coverity”.

  1. Stop using + operator and start using concat() method while concatenating string. you must be thinking why should i do that,I’m very much comfortable using + operator. concat() method is better than + operator because it creates a new object only when the string length is greater than zero, so it uses less amount of memory.

Thank you

Akshitha H



Software developer, feminist,exploring new technologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store