Rule Definition
When initializing String with a literal value, it is faster to create it with a String literal than a String object.
Remediation
Initialize it with the literal.
Violation Code Sample
String s = new String("hello"); // VIOLATION
Fixed Code Sample
String s = "hello"; // FIXED
Reference
http://www.precisejava.com/javaperf/j2se/StringAndStringBuffer.htm#Strings102
Related Technologies
JEE
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.