We often use loggers in our code for debugging purpose. We write something like this
logger.debug("");
My question is, doesn't it create lots of objects since we use String literals in debug statements so much? Is there any alternative to avoid it?